SuccessChanges

Summary

  1. [Sanitizer][RISCV] Fix FastUnwindTest (details)
  2. [CodeGenPrepare] Also skip lifetime.end intrinsic when check return block in dupRetToEnableTailCallOpts. (details)
  3. Fix test in "CFG: Create scope for non-compound range-for body." (details)
  4. [OpenMP] Fix comment and assertion strings (NFC). (details)
  5. [JITLink] Add missing symbols for ELF ehframe testcase, re-enable on Windows. (details)
  6. [RISCV] Custom lower fshl/fshr with Zbt extension. (details)
  7. Revert "[JITLink] Add missing symbols for ELF ehframe testcase, re-enable ...." (details)
  8. [X86] Cleanup isel patterns to use 'vnot' instead of (xor X, immAllOnesV) to improve readability. NFC (details)
  9. [PowerPC] Remove vnot_ppc and replace with the standard vnot. (details)
  10. [Mips] Cleanup isel patterns to use 'vnot' instead of (xor X, immAllOnesV). NFCI (details)
  11. [FPEnv] Intrinsic for setting rounding mode (details)
  12. [TableGen] Don't commute isel patterns if it would put an immAllOnesV or immAllZerosV on the left hand side. (details)
  13. [OpenMP] Fix python3 compatibility in openmp's lit.cfg (details)
  14. [mlir][Linalg] Replace SimplePad with PadTensor in hoist-padding (details)
  15. [mlir] Fix missing null termination in cuLinkAddData argument. (details)
  16. Revert "[mlir][Linalg] Replace SimplePad with PadTensor in hoist-padding" (details)
  17. [lldb][docs] Attempt to disable the generated GitHub button on the LLDB website (details)
  18. [LoopPeel] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed. (details)
  19. [LoopUnswitch] Add shortcut if unswitched path is a no-op. (details)
  20. [LoopUnswitch] Pacify compiler warnings. (details)
  21. [VE] Change inetger constants 32-bit friendly (details)
Commit 68e5614b42823cc1eef48916e1e6f551ad61a055 by luismarques
[Sanitizer][RISCV] Fix FastUnwindTest

Fixes the `FastUnwindTest` unit test for RISC-V.
These changes reflect the different stack organization commonly used for
that architecture.

Differential Revision: https://reviews.llvm.org/D90574
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cpp
Commit 54842fa0bba0c6cf69b7eb94f4b10d8da8aa5170 by JunMa
[CodeGenPrepare] Also skip lifetime.end intrinsic when check return block in dupRetToEnableTailCallOpts.

Differential Revision: https://reviews.llvm.org/D95424
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/test/Transforms/CodeGenPrepare/ARM/tailcall-dup.ll
The file was modifiedllvm/test/Transforms/CodeGenPrepare/X86/tailcall-assume-xbb.ll
Commit 20b1c1300c8f00d85e1292158f865c1bd0d1e12c by jyknight
Fix test in "CFG: Create scope for non-compound range-for body."

The constant 4 is sometimes printed as "4L", or "4LL", in CFG dump
output, depending on platform; accept all variants.

Ammends commit 8f670d5b6d8f39bf9bf1d142dacef3afaed6d70b.
The file was modifiedclang/test/Analysis/auto-obj-dtors-cfg-output.cpp
Commit e94a35a744b780fcbe18e8bc6a4f774191588d45 by michael.p.rice
[OpenMP] Fix comment and assertion strings (NFC).
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
Commit 6e58539659aea0ee621c7e267d825aa82d4e7e96 by Lang Hames
[JITLink] Add missing symbols for ELF ehframe testcase, re-enable on Windows.

This testcase was failing on windows due to missing definitions. This commit
adds definitions of the missing symbols (as absolute symbols) to eliminate the
errors.
The file was modifiedllvm/test/ExecutionEngine/JITLink/X86/ELF_ehframe_basic.s
Commit 44cc5abbf9166c47a1da7027123b13d230442610 by craig.topper
[RISCV] Custom lower fshl/fshr with Zbt extension.

We need to add a mask to the shift amount for these operations
to use the FSR/FSL instructions. We were previously doing this
in isel patterns, but custom lowering will make the mask
visible to optimizations earlier.
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoB.td
Commit d2bb07949b0e66a60f26a0a1fb6bcec609da5e63 by Lang Hames
Revert "[JITLink] Add missing symbols for ELF ehframe testcase, re-enable ...."

This reverts commit 6e58539659aea0ee621c7e267d825aa82d4e7e96.

This failed in http://lab.llvm.org:8011/#/builders/123/builds/2676. I guess
were're still missing some symbols, but unfortunately the specific error is
masked by a bug in python/lit that hides stderr. This test will have to remain
disabled on Windows until I can get help to debug it further.
The file was modifiedllvm/test/ExecutionEngine/JITLink/X86/ELF_ehframe_basic.s
Commit ff460268973533e8d39a7714223891d1b7c62d67 by craig.topper
[X86] Cleanup isel patterns to use 'vnot' instead of (xor X, immAllOnesV) to improve readability. NFC
The file was modifiedllvm/lib/Target/X86/X86InstrAVX512.td
Commit 94206f1f90fee1b92c49234a17cf8e1781179146 by craig.topper
[PowerPC] Remove vnot_ppc and replace with the standard vnot.

immAllOnesV has special support for looking through bitcasts
automatically so isel patterns don't need to explicitly look
for the bitconvert.
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrVSX.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrAltivec.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td
Commit ce27b327158e6ae7b726b6d867b7db5117a90b73 by craig.topper
[Mips] Cleanup isel patterns to use 'vnot' instead of (xor X, immAllOnesV). NFCI

A couple patterns used bitconvert on the immAllOnesV, but
the isel matching uses ISD::isBuildVectorAllOnes which
is able to look through bitcasts. So isel patterns don't need
to do it explicitly.
The file was modifiedllvm/lib/Target/Mips/MipsMSAInstrInfo.td
Commit bf416d166bdde187cf3b7e99888bcb4b95a93142 by sepavloff
[FPEnv] Intrinsic for setting rounding mode

To set non-default rounding mode user usually calls function 'fesetround'
from standard C library. This way has some disadvantages.

* It creates unnecessary dependency on libc. On the other hand, setting
  rounding mode requires few instructions and could be made by compiler.
  Sometimes standard C library even is not available, like in the case of
  GPU or AI cores that execute small kernels.
* Compiler could generate more effective code if it knows that a particular
  call just sets rounding mode.

This change introduces new IR intrinsic, namely 'llvm.set.rounding', which
sets current rounding mode, similar to 'fesetround'. It however differs
from the latter, because it is a lower level facility:

* 'llvm.set.rounding' does not return any value, whereas 'fesetround'
  returns non-zero value in the case of failure. In glibc 'fesetround'
  reports failure if its argument is invalid or unsupported or if floating
  point operations are unavailable on the hardware. Compiler usually knows
  what core it generates code for and it can validate arguments in many
  cases.
* Rounding mode is specified in 'fesetround' using constants like
  'FE_TONEAREST', which are target dependent. It is inconvenient to work
  with such constants at IR level.

C standard provides a target-independent way to specify rounding mode, it
is used in FLT_ROUNDS, however it does not define standard way to set
rounding mode using this encoding.

This change implements only IR intrinsic. Lowering it to machine code is
target-specific and will be implemented latter. Mapping of 'fesetround'
to 'llvm.set.rounding' is also not implemented here.

Differential Revision: https://reviews.llvm.org/D74729
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modifiedllvm/unittests/IR/IRBuilderTest.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit 77f077b8c3b2e8bbf9b160d56194312e506dfe8f by craig.topper
[TableGen] Don't commute isel patterns if it would put an immAllOnesV or immAllZerosV on the left hand side.

This primarily occurs with isel patterns using vnot. This reduces
the number of variants in the isel tables.

We generally canonicalize build_vectors of constants to the RHS. I think
we might fail if there is a bitcast on the build_vector, but that
should be easy to fix if we can find a case. Usually the
bitcast is introduced by type legalization or lowering. It's
likely canonicalization would have already occured.
The file was modifiedllvm/utils/TableGen/CodeGenDAGPatterns.cpp
Commit c3c02d0d5a313272f6d35926bdf678fc6b884c02 by tobias
[OpenMP] Fix python3 compatibility in openmp's lit.cfg

Differential Revision: https://reviews.llvm.org/D95669
The file was modifiedopenmp/runtime/test/lit.cfg
Commit d9b953d84b332a8c4751fcbf8178e32818dc718b by hanchung
[mlir][Linalg] Replace SimplePad with PadTensor in hoist-padding

This is the last revision to migrate using SimplePadOp to PadTensorOp, and the
SimplePadOp is removed in the patch. Update a bit in SliceAnalysis because the
PadTensorOp takes a region different from SimplePadOp. This is not covered by
LinalgOp because it is not a structured op.

Also, remove a duplicated comment from cpp file, which is already described in a
header file. And update the pseudo-mlir in the comment.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D95671
The file was modifiedmlir/test/Dialect/Linalg/hoist-padding.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Hoisting.h
The file was modifiedmlir/lib/Analysis/SliceAnalysis.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
The file was modifiedmlir/lib/Analysis/CMakeLists.txt
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
Commit a4b7d52f3a219e7726edc8c3805c1d6dc7bd97a5 by csigg
[mlir] Fix missing null termination in cuLinkAddData argument.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D95679
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
Commit 2790cbedd0a886fa70c35efda40924679d1cbcd0 by tpopp
Revert "[mlir][Linalg] Replace SimplePad with PadTensor in hoist-padding"

This reverts commit d9b953d84b332a8c4751fcbf8178e32818dc718b.

This commit resulted in build bot failures and the author is away from a
computer, so I am reverting on their behalf until they have a chance to
look into this.
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/lib/Analysis/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
The file was modifiedmlir/lib/Analysis/SliceAnalysis.cpp
The file was modifiedmlir/test/Dialect/Linalg/hoist-padding.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Hoisting.h
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
Commit 2939d2e1b46c05432864db333ca3d5cb7ab83533 by Raphael Isemann
[lldb][docs] Attempt to disable the generated GitHub button on the LLDB website

For unknown reasons the alabaster theme on the docs server is always generating
a GitHub link in the side bar. Beside the privacy problems of having an iframe
to some third-party service, we never configured any GitHub integration so
this button just links to the GitHub main site.

The button generation should be disabled by default, but as that's apparently
not true in the alabaster theme on the server, this patch tries working around
the issue by just explicitly turning off the GitHub integration.
The file was modifiedlldb/docs/conf.py
Commit 80cdd30eb90c3509bf315f1fa1369483e2448bbd by jeroen.dobbelaere
[LoopPeel] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed.

The reduction of a sanitizer build failure when enabling the dominance check (D95335) showed that loop peeling also needs to take care of scope duplication, just like loop unrolling (D92887).

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D95544
The file was modifiedllvm/lib/Transforms/Utils/LoopPeel.cpp
The file was addedllvm/test/Transforms/LoopUnroll/peel-loop-noalias-scope-decl.ll
Commit b8c81fa5c7f77a7a1267e42ddbbc9bffb10b0817 by flo
[LoopUnswitch] Add shortcut if unswitched path is a no-op.

If we determine that the invariant path through the loop has no effects,
we can directly branch to the exit block, instead to unswitching first.

Besides avoiding some extra work (unswitching first, then deleting the
loop again) this allows to be more aggressive than regular unswitching
with respect to cost-modeling. This approach should always be be
desirable.

This is similar in spirit to D93734, just that it uses the previously
added checks for loop-unswitching.

I tried to add the required no-op checks from scratch, as we only check
a subset of the loop. There is potential to unify the checks with
LoopDeletion, at the cost of adding a predicate whether a block should
be considered.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95468
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnswitch.cpp
The file was modifiedllvm/test/Transforms/LoopUnswitch/partial-unswitch-cost.ll
Commit a9583a19237e66fa56fcd979511ac14232e9a3c3 by flo
[LoopUnswitch] Pacify compiler warnings.

Attempt to fix some compiler warnings on some bots after
b8c81fa5c7f77a7a1267e42ddbbc9bffb10b0817.
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnswitch.cpp
Commit 4648098f97fa2a7c08c04632c70cf29293528812 by marukawa
[VE] Change inetger constants 32-bit friendly

Correct integer constants like `1UL << 63` to `UINT64_C(1) << 63` in
order to make them work on 32-bit machines.  Tested on both an i386
and x86_64 machines.

Reviewed By: mgorny

Differential Revision: https://reviews.llvm.org/D95724
The file was modifiedllvm/lib/Target/VE/VE.h