Changes

Summary

  1. [RISCV] Support peephole optimization to fold vmerge.vvm that has tail agnostic policy and unmasked intrinsics. (details)
  2. [Driver] Fix -f[no-]unwind-tables -Wunused-command-line-argument after 4388b56d525c08ce3cf941cfbad2428b0e1695b0 (details)
  3. [RISCV] Remove support for the unratified Zbt extension. (details)
  4. [LLDB][RISCV] Fix UndefinedBehaviorSanitizer in RISCVEmulatorTester (details)
  5. [mlir][SCF] Fix loop pipelining unable to handle ops with regions (details)
  6. Fix -fuse-ld to be linker flag in feature detection check (details)
  7. Revert "[mlir][tensor] Support more cases in MergeConsecutiveExtractSlice" (details)
  8. [Clang][OpenMP] Codegen generation for has_device_addr claues. (details)
Commit 1cbf44bd503b047f114a585e6b6c034d15401e6d by jacquesguan
[RISCV] Support peephole optimization to fold vmerge.vvm that has tail agnostic policy and unmasked intrinsics.

This patch supports the tail agnostic part of D130442.

Reviewed By: fakepaper56

Differential Revision: https://reviews.llvm.org/D132923
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-vselect.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-peephole-vmerge-vops.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fptosi-sat.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops-mir.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vmv.s.x-rv32.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vselect-int-rv32.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll (diff)
Commit 669e508772e5e00db6285d699ee82a428dc00f32 by i
[Driver] Fix -f[no-]unwind-tables -Wunused-command-line-argument after 4388b56d525c08ce3cf941cfbad2428b0e1695b0
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp (diff)
The file was modifiedclang/test/Driver/clang-translation.c (diff)
Commit 70a64fe7b18f7d1e0650e758666593d4a8800693 by craig.topper
[RISCV] Remove support for the unratified Zbt extension.

This extension does not appear to be on its way to ratification.

Out of the unratified bitmanip extensions, this one had the
largest impact on the compiler.

Posting this patch to start a discussion about whether we should
remove these extensions. We'll talk more at the RISC-V sync meeting this
Thursday.

Reviewed By: asb, reames

Differential Revision: https://reviews.llvm.org/D133834
The file was modifiedllvm/include/llvm/IR/IntrinsicsRISCV.td (diff)
The file was removedllvm/test/MC/RISCV/rv32zbt-valid.s
The file was modifiedllvm/lib/Target/RISCV/RISCVScheduleB.td (diff)
The file was modifiedllvm/test/CodeGen/RISCV/div-pow2.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/iabs.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/sadd_sat.ll (diff)
The file was removedllvm/test/CodeGen/RISCV/rv64zbt-intrinsic.ll
The file was removedllvm/test/MC/RISCV/rv64zbt-valid.s
The file was modifiedllvm/lib/Target/RISCV/RISCVSchedRocket.td (diff)
The file was modifiedllvm/test/CodeGen/RISCV/attributes.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/ssub_sat_plus.ll (diff)
The file was removedllvm/test/MC/RISCV/rv32zbt-invalid.s
The file was modifiedclang/include/clang/Basic/BuiltinsRISCV.def (diff)
The file was modifiedllvm/test/CodeGen/RISCV/neg-abs.ll (diff)
The file was modifiedllvm/docs/RISCVUsage.rst (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVSchedSiFive7.td (diff)
The file was removedllvm/test/MC/RISCV/rv64zbt-invalid.s
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/RISCV/select-and.ll (diff)
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp (diff)
The file was removedclang/test/CodeGen/RISCV/rvb-intrinsics/riscv64-zbt.c
The file was removedclang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-zbt.c
The file was modifiedllvm/test/CodeGen/RISCV/select-bare.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/select-or.ll (diff)
The file was removedllvm/test/CodeGen/RISCV/rv32zbt-intrinsic.ll
The file was modifiedllvm/docs/ReleaseNotes.rst (diff)
The file was removedllvm/test/CodeGen/RISCV/rv64zbt.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h (diff)
The file was modifiedllvm/test/CodeGen/RISCV/select-cc.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCV.td (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVSubtarget.h (diff)
The file was modifiedllvm/test/CodeGen/RISCV/select-optimize-multiple.mir (diff)
The file was removedllvm/test/CodeGen/RISCV/rv32zbt.ll
The file was modifiedllvm/test/CodeGen/RISCV/select-const.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/select-optimize-multiple.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/ssub_sat.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoZb.td (diff)
The file was modifiedllvm/test/CodeGen/RISCV/sadd_sat_plus.ll (diff)
Commit 07d0ef306b74fbcede432ad3480d2f299c051a98 by yjhdandan
[LLDB][RISCV] Fix UndefinedBehaviorSanitizer in RISCVEmulatorTester
The file was modifiedlldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp (diff)
Commit f5fe92f6938511a8e8c6ec850b842a499c8b040f by cbate
[mlir][SCF] Fix loop pipelining unable to handle ops with regions

This change allows the SCF LoopPipelining transform to handle ops with
nested regions within the pipelined `scf.for` body. The op and nested
regions are treated as a single unit from the transform's perspective.
This change also makes explicit the requirement that only ops whose
parent Block is the loop body Block are allowed to be scheduled by the
caller.

Reviewed By: ThomasRaoux, nicolasvasilache

Differential Revision: https://reviews.llvm.org/D133965
The file was modifiedmlir/test/Dialect/SCF/loop-pipelining.mlir (diff)
The file was modifiedmlir/test/lib/Dialect/SCF/TestSCFUtils.cpp (diff)
The file was modifiedmlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp (diff)
The file was modifiedmlir/include/mlir/Dialect/SCF/IR/SCFOps.td (diff)
The file was modifiedmlir/test/lib/Dialect/SCF/CMakeLists.txt (diff)
Commit b052eead95e0564e1230bcca7dee199de2b7f19f by joker.eph
Fix -fuse-ld to be linker flag in feature detection check

Discovered an issue working in StableHLO when attempting to build with `-Wall -Werror`:
https://github.com/openxla/stablehlo/pull/137

Currently, if `LLVM_USE_LLD` and `-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wall -Werror"`
are both specified for build, the build will error with:

```
-- Performing Test CXX_SUPPORTS_CUSTOM_LINKER - Failed
CMake Error at /usr/local/google/home/gleasonk/Coding/llvm-build/lib/cmake/llvm/HandleLLVMOptions.cmake:309 (message):
  Host compiler does not support '-fuse-ld=lld'
...

$ cat <build_dir>/CMakeFiles/CMakeError.log
...
clang: error: argument unused during compilation: '-fuse-ld=lld' [-Werror,-Wunused-command-line-argument]
```

It looks like other repos have hit this same issue:
- https://github.com/golang/go/issues/41527 (mentioned in comment)
- https://github.com/iree-org/iree/pull/7450

This can be reproduced in llvm-project with the following build command:

```
# Compile command taken from https://mlir.llvm.org/getting_started/
# and modified for use case
cmake -G Ninja ../llvm \
   -DLLVM_ENABLE_PROJECTS=mlir \
   -DLLVM_BUILD_EXAMPLES=ON \
   -DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_ENABLE_ASSERTIONS=ON \
   -DCMAKE_CXX_COMPILER=clang++ \
   -DCMAKE_C_COMPILER=clang \
   -DLLVM_ENABLE_LLD=ON \
   -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wall -Werror"
```

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D134206
The file was modifiedllvm/cmake/modules/HandleLLVMOptions.cmake (diff)
Commit e0a6df53b4b40f7579a3f10fc194880fe9479e49 by joker.eph
Revert "[mlir][tensor] Support more cases in MergeConsecutiveExtractSlice"

This reverts commit 5d4603a02d0c3e0106b10d245322b1d2072c0c3d.

The Dialect/Tensor/fold-consecutive-insert-extract-slice.mlir test is
failing when built with GCC
The file was modifiedmlir/lib/Dialect/Tensor/Transforms/MergeConsecutiveInsertExtractSlicePatterns.cpp (diff)
The file was modifiedmlir/test/Dialect/Tensor/fold-consecutive-insert-extract-slice.mlir (diff)
The file was modifiedmlir/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h (diff)
Commit 48ffd40ba295f2cb194237737d9c378348c7b1c9 by jennifer.yu
[Clang][OpenMP] Codegen generation for has_device_addr claues.

This patch add codegen support for the has_device_addr clause. It use
the same logic of is_device_ptr. But passing &var instead pointer to var
to kernal.

Differential Revision: https://reviews.llvm.org/D134268
The file was addedclang/test/OpenMP/target_has_device_addr_codegen_01.cpp
The file was addedclang/test/OpenMP/target_has_device_addr_codegen.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp (diff)
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp (diff)
The file was addedopenmp/libomptarget/test/mapping/target_has_device_addr.c
The file was addedopenmp/libomptarget/test/mapping/has_device_addr.cpp

Summary

  1. [SPEC2000] Disable Wimplicit-int, set CXX standard to fix build errors. (details)
Commit 4b482df2cee902b27e322030244812e1bc5f6e1f by florian_hahn
[SPEC2000] Disable Wimplicit-int, set CXX standard to fix build errors.

This should make CINT2000/CPF2000 build again with recent Clang builds.
The file was modifiedExternal/SPEC/CINT2000/300.twolf/CMakeLists.txt (diff)
The file was modifiedExternal/SPEC/CFP2000/188.ammp/CMakeLists.txt (diff)
The file was modifiedExternal/SPEC/CINT2000/252.eon/CMakeLists.txt (diff)
The file was modifiedExternal/SPEC/CINT2000/255.vortex/CMakeLists.txt (diff)