Changes

Summary

  1. Disable GPU in polly-arm-linux and aosp-O3-polly-before-vectorizer-unprofitable (details)
Commit f09bb849f94c1fbf105185bc0ff164e2a421f638 by kparzysz
Disable GPU in polly-arm-linux and aosp-O3-polly-before-vectorizer-unprofitable
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)

Summary

  1. [InstCombine] convert FP min/max with negated op to fabs (details)
  2. [RISCV] Add explicit copy to V0 in the masked vmsge(u).vx intrinsic handling. (details)
  3. [UpdateCCTestChecks][NFC] Permit other comments in common.py (details)
  4. [InstCombine] Eliminate casts to optimize ctlz operation (details)
  5. [ARM] Limit v6m unrolling with multiple live outs (details)
  6. [ValueTracking] look through bitcast of vector in computeKnownBits (details)
  7. [clang-format] Add IfMacros option (details)
  8. Update Bazel BUILD files up to be9a87fe9b (details)
  9. [Demangle][Rust] Hide implementation details NFC (details)
  10. [LAA] Make getPointersDiff() API compatible with opaque pointers (details)
  11. [ConstantFold] Allow propagation of poison for and/or i1 (details)
Commit 1e9b6b89a7b5c49612018b120c2c142106056f82 by spatel
[InstCombine] convert FP min/max with negated op to fabs

This is part of improving floating-point patterns seen in:
https://llvm.org/PR39480

We don't require any FMF because the 2 potential corner cases
(-0.0 and NaN) are correctly handled without FMF:
1. -0.0 is treated as strictly less than +0.0 with
   maximum/minimum, so fabs/fneg work as expected.
2. +/- 0.0 with maxnum/minnum is indeterminate, so
   transforming to fabs/fneg is more defined.
3. The sign of a NaN may be altered by this transform,
   but that is allowed in the default FP environment.

If there are FMF, they are propagated from the min/max call to
one or both new operands which seems to agree with Alive2:
https://alive2.llvm.org/ce/z/bem_xC
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/maxnum.ll
The file was modifiedllvm/test/Transforms/InstCombine/minnum.ll
The file was modifiedllvm/test/Transforms/InstCombine/maximum.ll
The file was modifiedllvm/test/Transforms/InstCombine/minimum.ll
Commit a37cf17834d39411ed1d669098b428f8374c5b45 by craig.topper
[RISCV] Add explicit copy to V0 in the masked vmsge(u).vx intrinsic handling.

This is consistent with our other masked vector instructions.
Previously we found cases where not doing this broke fast reg
alloc.
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Commit 38b7b1d4a2930cc82e69a8069fad4b363f73a212 by jdenny.ornl
[UpdateCCTestChecks][NFC] Permit other comments in common.py

Some parts of common.py already permit comment styles besides `;`.
Handle the remaining cases.  Specifically, a future patch will extend
update_cc_test_checks.py to call add_global_checks.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D104713
The file was modifiedllvm/utils/UpdateTestChecks/common.py
Commit ad0085d3381a28041244fe6847f6ac1ce8dd052e by spatel
[InstCombine] Eliminate casts to optimize ctlz operation

If a ctlz operation is performed on higher datatype and then
downcasted, then this can be optimized by doing a ctlz operation
on a lower datatype and adding the difference bitsize to the result
of ctlz to provide the same output:

https://alive2.llvm.org/ce/z/8uup9M

The original problem is shown in
https://llvm.org/PR50173

Differential Revision: https://reviews.llvm.org/D103788
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll
Commit 8cfc08013299d873edd364436aa78e7effb28dd4 by david.green
[ARM] Limit v6m unrolling with multiple live outs

v6m cores only have a limited number of registers available. Unrolling
can mean we spend more on stack spills and reloads than we save from the
unrolling. This patch adds an extra heuristic to put a limit on the
unroll count for loops with multiple live out values, as measured from
the LCSSA phi nodes.

Differential Revision: https://reviews.llvm.org/D104659
The file was addedllvm/test/Transforms/LoopUnroll/ARM/v6munroll.ll
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Commit 656001e7b2b939d9bce4fb58831d314dc67ddf7a by spatel
[ValueTracking] look through bitcast of vector in computeKnownBits

This borrows as much as possible from the SDAG version of the code
(originally added with D27129 and since updated with big endian support).

In IR, we can test more easily for correctness than we did in the
original patch. I'm using the simplest cases that I could find for
InstSimplify: we computeKnownBits on variable shift amounts to see if
they are zero or in range. So shuffle constant elements into a vector,
cast it, and shift it.

The motivating x86 example from https://llvm.org/PR50123 is also here.
We computeKnownBits in the caller code, but we only check if the shift
amount is in range. That could be enhanced to catch the 2nd x86 test -
if the shift amount is known too big, the result is 0.

Alive2 understands the datalayout and agrees that the tests here are
correct - example:
https://alive2.llvm.org/ce/z/KZJFMZ

Differential Revision: https://reviews.llvm.org/D104472
The file was modifiedllvm/test/Transforms/InstCombine/X86/x86-vector-shifts.ll
The file was modifiedllvm/test/Transforms/InstSimplify/shift-knownbits.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit be9a87fe9bc395074c383c07fbd9c0bce953985f by vlovich
[clang-format] Add IfMacros option

https://bugs.llvm.org/show_bug.cgi?id=49354

Differential Revision: https://reviews.llvm.org/D102730
The file was modifiedclang/lib/Format/FormatTokenLexer.cpp
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/include/clang/Format/Format.h
The file was modifiedclang/lib/Format/FormatToken.h
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/docs/ReleaseNotes.rst
Commit b58dfd87da5cb19693764869a9a158f88c3d4bde by gcmn
Update Bazel BUILD files up to be9a87fe9b

Differential Revision: https://reviews.llvm.org/D104791
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Commit 6cc6ada143236f16faf8b383d73e00e709fa6a9f by tomasz.miasko
[Demangle][Rust] Hide implementation details NFC

Move content of the "public" header into the implementation file.

This also renames two enumerations that were previously used through
`rust_demangle::` scope, to avoid breaking a build bot with older
version of GCC that rejects uses of enumerator through `E::A` if there
is a variable with the same name as enumeration `E` in the scope.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D104362
The file was removedllvm/include/llvm/Demangle/RustDemangle.h
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit 00d3f7cc3c264adc360d0282ba8a27de2a004b94 by nikita.ppv
[LAA] Make getPointersDiff() API compatible with opaque pointers

Make getPointersDiff() and sortPtrAccesses() compatible with opaque
pointers by explicitly passing in the element type instead of
determining it from the pointer element type.

The SLPVectorizer result is slightly non-optimal in that unnecessary
pointer bitcasts are added.

Differential Revision: https://reviews.llvm.org/D104784
The file was addedllvm/test/Transforms/SLPVectorizer/X86/opaque-ptr.ll
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
The file was modifiedllvm/include/llvm/Analysis/LoopAccessAnalysis.h
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 2fd3037ac615643fe8058292d2b89bb19a49cb2f by aqjune
[ConstantFold] Allow propagation of poison for and/or i1

They were disallowed due to its bad interaction with select i1 -> and/or i1.
The transformation is now disabled by D101191, so let's revive this.
The file was modifiedllvm/lib/IR/ConstantFold.cpp