FailedChanges

Summary

  1. Fix include path for check-gdb-mlir-support to include the MLIR binary dir (details)
  2. Fix check-gdb-mlir-support build after MLIR API changed to take Context as first argument (details)
  3. GlobalISel: Add combine for G_UREM by power of 2 (details)
  4. [NFC] clang/test/openMP/target_codegen.cpp should not depend on ssa name (details)
  5. [libc++abi] Simplify __gxx_personality_v0 (details)
  6. [test] Move coro-retcon-unreachable.ll into llvm/test (details)
  7. [CoroSplit][NewPM] Don't call LazyCallGraph functions to split when no clones (details)
  8. Fixup Asserts+!AbiBreakingChecks fallout from db33f85c7124 (details)
  9. [TableGen] Make CodeGenDAGPatterns::getSDNodeNamed take a StringRef instead of const std::string &. (details)
  10. [LLD][COFF] When using PCH.OBJ, ensure func_id records indices are remapped under /DEBUG:GHASH (details)
  11. lldb: Add support for DW_AT_ranges on DW_TAG_subprograms (details)
  12. [libc++] Fix typo in run-buildbot (details)
  13. GlobalISel: Fail legalization on narrowing extload below memory size (details)
  14. [hip] Enable HIP compilation with `<complex`> on MSVC. (details)
  15. [OpenMP] Always print error messages in libomptarget CUDA plugin (details)
  16. [LLDB][RISCV] Add RISC-V ArchSpec and rv32/rv64 variant detection (details)
  17. [NewPM][Hexagon] Fix HexagonVectorLoopCarriedReusePass position in pipeline (details)
  18. [libc++] Alphabetize generate_feature_test_macro_components.py. NFCI. (details)
  19. [NewPM][NVPTX] Port NVPTX opt passes (details)
  20. [NFC][SimplifyCFG] Add a test with cond br on constant w/ identical destinations (details)
  21. [SimplifyCFG] ConstantFoldTerminator(): handle matching destinations of condbr earlier (details)
  22. [SimplifyCFG] ConstantFoldTerminator(): switch to non-permissive DomTree updates in `SwitchInst` handling (details)
  23. [NFC][SimlifyCFG] Add some indirectbr-of-blockaddress tests (details)
  24. [SimplifyCFG] ConstantFoldTerminator(): switch to non-permissive DomTree updates in `indirectbr` handling (details)
  25. [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock(): switch to non-permissive DomTree updates (details)
  26. [NFC][SimplifyCFG] Add test with an unreachable block with two identical successors (details)
  27. [SimplifyCFG] removeUnreachableBlocks(): switch to non-permissive DomTree updates (details)
  28. [NFC][SimplifyCFG] Add a test with an undef cond branch to identical destinations (details)
  29. [SimplifyCFG] changeToUnreachable(): switch to non-permissive DomTree updates (details)
  30. [SimplifyCFG] MergeBlockIntoPredecessor(): switch to non-permissive DomTree updates (details)
  31. [SimplifyCFG] DeleteDeadBlocks(): switch to non-permissive DomTree updates (details)
  32. [SimplifyCFG] changeToCall(): switch to non-permissive DomTree updates (details)
  33. [SimplifyCFG] removeUnwindEdge(): switch to non-permissive DomTree updates (details)
  34. [SimplifyCFG] markAliveBlocks(): switch to non-permissive DomTree updates (details)
  35. [RISCV] Define the vfsqrt RVV intrinsics (details)
  36. Fix build after eaadb41db6233cf1c9e882d74a31c1f9d6e211ff when the MSVC libs are not in PATH. (details)
  37. [Cloning] Copy metadata of global declarations (details)
Commit 476db17dcb64ef3ec6e247f4b1c673b57f61a367 by joker.eph
Fix include path for check-gdb-mlir-support to include the MLIR binary dir

This fixes a build failure:

fatal error: 'mlir/IR/BuiltinTypes.h.inc' file not found
The file was modifieddebuginfo-tests/CMakeLists.txt
Commit 9e1aaa9943b814c22ae03f4abb3171dac8062801 by joker.eph
Fix check-gdb-mlir-support build after MLIR API changed to take Context as first argument
The file was modifieddebuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
Commit 1f9b6ef91ffd8ea487aa083d146c7568e7243457 by Matthew.Arsenault
GlobalISel: Add combine for G_UREM by power of 2

Really I want this in the legalizer, but this is a start.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/urem.i32.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-urem-pow-2.mir
Commit 63b42a0514567d24df617e4587e80e4564ebf120 by tianshilei1992
[NFC] clang/test/openMP/target_codegen.cpp should not depend on ssa name

This makes the test more robust to other changes.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D93038
The file was modifiedclang/test/OpenMP/target_codegen.cpp
Commit 85f86e8a3cf9e05347691fdde30e9e98a6657d92 by i
[libc++abi] Simplify __gxx_personality_v0

In three cases we call `scan_eh_tab` to parse LSDA:

* `actions & _UA_SEARCH_PHASE`
* `actions & _UA_CLEANUP_PHASE && actions & _UA_HANDLER_FRAME && !native_exception`
* `actions & _UA_CLEANUP_PHASE && !(actions & _UA_HANDLER_FRAME)`

Check
`actions & _UA_CLEANUP_PHASE && actions & _UA_HANDLER_FRAME && native_exception` first,
then we can move three `scan_eh_tab` into one place.

Another simplification is that we can check whether the result of `scan_eh_tab`
is `_UA_CONTINUE_UNWIND` or `_UA_FATAL_PHASE1_ERROR` first. Then many of the
original checks will be dead and can thus be deleted.

Reviewed By: #libc_abi, ldionne

Differential Revision: https://reviews.llvm.org/D93186
The file was modifiedlibcxxabi/src/cxa_personality.cpp
Commit d002cd4e0f10f20c4f8b419ffa23d782636e46d8 by aeubanks
[test] Move coro-retcon-unreachable.ll into llvm/test

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D94257
The file was addedllvm/test/Transforms/Coroutines/coro-retcon-unreachable.ll
The file was removedclang/test/CodeGenCoroutines/coro-retcon-unreachable.ll
Commit 1a2eaebc09c6a200f93b8beb37130c8b8aab3934 by aeubanks
[CoroSplit][NewPM] Don't call LazyCallGraph functions to split when no clones

Apparently there can be no clones, as happens in
coro-retcon-unreachable.ll.

The alternative is to allow no split functions in
addSplitRefRecursiveFunctions(), but it seems better to have the caller
make sure it's not accidentally splitting no functions out.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D94258
The file was modifiedllvm/test/Transforms/Coroutines/coro-retcon-unreachable.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
Commit 3503c856819efc01ce210fa56e597ddfb7a4c1a1 by dblaikie
Fixup Asserts+!AbiBreakingChecks fallout from db33f85c7124
The file was modifiedllvm/include/llvm/IR/ValueHandle.h
The file was modifiedllvm/unittests/IR/ValueHandleTest.cpp
The file was modifiedllvm/unittests/Support/DataExtractorTest.cpp
Commit 973c35d3384ace023000eb44442f86a2543ab9eb by craig.topper
[TableGen] Make CodeGenDAGPatterns::getSDNodeNamed take a StringRef instead of const std::string &.

All callers use a string literal and the getDef method the string
is passed to already takes a StringRef.
The file was modifiedllvm/utils/TableGen/CodeGenDAGPatterns.cpp
The file was modifiedllvm/utils/TableGen/CodeGenDAGPatterns.h
Commit eaadb41db6233cf1c9e882d74a31c1f9d6e211ff by alexandre.ganea
[LLD][COFF] When using PCH.OBJ, ensure func_id records indices are remapped under /DEBUG:GHASH

Before this patch, when using LLD with /DEBUG:GHASH and MSVC precomp.OBJ files, we had a bunch of:

lld-link: warning: S_[GL]PROC32ID record in blabla.obj refers to PDB item index 0x206ED1 which is not a LF[M]FUNC_ID record

This was caused by LF_FUNC_ID and LF_MFUNC_ID which didn't have correct mapping to the corresponding TPI records. The root issue was that the indexMapStorage was improperly re-assembled in UsePrecompSource::remapTpiWithGHashes.

After this patch, /DEBUG and /DEBUG:GHASH produce exactly the same debug infos in the PDB.

Differential Revision: https://reviews.llvm.org/D93732
The file was addedlld/test/COFF/Inputs/precomp-ghash-precomp.obj
The file was modifiedlld/COFF/DebugTypes.cpp
The file was addedlld/test/COFF/precomp-ghash.test
The file was addedlld/test/COFF/Inputs/precomp-ghash-obj2.obj
The file was addedlld/test/COFF/Inputs/precomp-ghash-obj1.obj
Commit 274afac9a17f43e5396a0d6c7a0741702596a7bd by dblaikie
lldb: Add support for DW_AT_ranges on DW_TAG_subprograms

gcc already produces debug info with this form
-freorder-block-and-partition
clang produces this sort of thing with -fbasic-block-sections and with a
coming-soon tweak to use ranges in DWARFv5 where they can allow greater
reuse of debug_addr than the low/high_pc forms.

This fixes the case of breaking on a function name, but leaves broken
printing a variable - a follow-up commit will add that and improve the
test case to match.

Differential Revision: https://reviews.llvm.org/D94063
The file was addedlldb/test/Shell/SymbolFile/DWARF/Inputs/subprogram_ranges.s
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
The file was addedlldb/test/Shell/SymbolFile/DWARF/subprogram_ranges.test
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
Commit c01202a7efdd73fed280755184762b0ef8a5b78a by Louis Dionne
[libc++] Fix typo in run-buildbot

The installation directory was never meant to contain a brace.
The file was modifiedlibcxx/utils/ci/run-buildbot
Commit 2cbbc6e87c4b565a54c9bb85e34d464acb608f16 by Matthew.Arsenault
GlobalISel: Fail legalization on narrowing extload below memory size
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sextload-global.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-zextload-global.mir
Commit f78d6af7319aa676a0f9f6cbb982f21c96e9aac5 by michael.hliao
[hip] Enable HIP compilation with `<complex`> on MSVC.

- MSVC has different `<complex>` implementation which calls into functions
  declared in `<ymath.h>`. Provide their device-side implementation to enable
  `<complex>` compilation on HIP Windows.

Differential Revision: https://reviews.llvm.org/D93638
The file was modifiedclang/lib/Headers/__clang_hip_cmath.h
Commit 2ce16810f28379b0a56f7036895a04e18d6b4506 by huberjn
[OpenMP] Always print error messages in libomptarget CUDA plugin

Summary:
Currently error messages from the CUDA plugins are only printed to the user if they have debugging enabled. Change this behaviour to always print the messages that result in offloading failure. This improves the error messages by indidcating what happened when the error occurs in the plugin library, such as a segmentation fault on the device.

Reviewed by: jdoerfert

Differential Revision: https://reviews.llvm.org/D94263
The file was modifiedopenmp/libomptarget/plugins/cuda/src/rtl.cpp
Commit 15f5971150684b656005cfd5b744c1a34477ff60 by luismarques
[LLDB][RISCV] Add RISC-V ArchSpec and rv32/rv64 variant detection

Adds the RISC-V ArchSpec bits contributed by @simoncook as part of D62732,
plus logic to distinguish between riscv32 and riscv64 based on ELF class.

The patch follows the implementation approach previously used for MIPS.
It defines RISC-V architecture subtypes and inspects the ELF header,
namely the ELF class, to detect the right subtype.

Differential Revision: https://reviews.llvm.org/D86292
The file was modifiedlldb/include/lldb/Utility/ArchSpec.h
The file was modifiedlldb/source/Utility/ArchSpec.cpp
The file was modifiedlldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
The file was addedlldb/test/Shell/ObjectFile/ELF/riscv-arch.yaml
Commit b2dafd44ca7a975e3d58d68f3a24e36b2ceb2e1e by aeubanks
[NewPM][Hexagon] Fix HexagonVectorLoopCarriedReusePass position in pipeline

In https://reviews.llvm.org/D88138 this was incorrectly added with
registerOptimizerLastEPCallback(), when it should be
registerLoopOptimizerEndEPCallback(), matching the legacy PM's
EP_LoopOptimizerEnd.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D93929
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
Commit ff1b6f9ff27cc4d5607ea2b5daa980a1c553236b by arthur.j.odwyer
[libc++] Alphabetize generate_feature_test_macro_components.py. NFCI.

For ease of comparing our list with the official SD-6 list, which is alphabetized.
https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#library-feature-test-macros
This also alphabetizes the lists of headers in which the macros are
defined, which harmlessly alters many comments in <version>.
Also drive-by-fix some trivial flake8 warnings.
The file was modifiedlibcxx/include/version
The file was modifiedlibcxx/utils/generate_feature_test_macro_components.py
Commit 9ccf13c36d1c450bc9a74bd04c9730df56f8bd73 by aeubanks
[NewPM][NVPTX] Port NVPTX opt passes

There are only two used in the IR optimization pipeline.
Port these and add them to the default pipeline.

Similar to https://reviews.llvm.org/D93863.

I added -mtriple to some tests since under the new PM, the passes are
only available when the TargetMachine is specified.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D93930
The file was modifiedllvm/test/CodeGen/NVPTX/intrinsic-old.ll
The file was modifiedllvm/lib/Target/NVPTX/NVPTX.h
The file was modifiedllvm/tools/opt/opt.cpp
The file was modifiedllvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
The file was modifiedllvm/test/CodeGen/NVPTX/nvvm-reflect.ll
The file was modifiedllvm/lib/Target/NVPTX/NVPTXTargetMachine.h
The file was modifiedllvm/lib/Target/NVPTX/NVVMIntrRange.cpp
The file was modifiedllvm/test/CodeGen/NVPTX/nvvm-reflect-module-flag.ll
The file was modifiedllvm/lib/Target/NVPTX/NVVMReflect.cpp
Commit 087be536feab0aacc043aed52bee2e48e90e538c by lebedev.ri
[NFC][SimplifyCFG] Add a test with cond br on constant w/ identical destinations
The file was modifiedllvm/test/Transforms/SimplifyCFG/branch-fold.ll
Commit 16ab8e5f6dbbeb5b8e900677f4a64c9924ecd7ba by lebedev.ri
[SimplifyCFG] ConstantFoldTerminator(): handle matching destinations of condbr earlier

We need to handle this case before dealing with the case of constant
branch condition, because if the destinations match, latter fold
would try to remove the DomTree edge that would still be present.

This allows to make that particular DomTree update non-permissive
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 36593a30a40b52e8040d821bbd294ef6758cf9cf by lebedev.ri
[SimplifyCFG] ConstantFoldTerminator(): switch to non-permissive DomTree updates in `SwitchInst` handling

... which requires not deleting edges that will still be present.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 8b9a0e6f7ed2fa3293ba5cd2c2fb1acd21db6e2d by lebedev.ri
[NFC][SimlifyCFG] Add some indirectbr-of-blockaddress tests
The file was modifiedllvm/test/Transforms/SimplifyCFG/indirectbr.ll
Commit b3822728fae2e3755d6daff7fc31fbac16e61fe4 by lebedev.ri
[SimplifyCFG] ConstantFoldTerminator(): switch to non-permissive DomTree updates in `indirectbr` handling

... which requires not deleting edges that were just deleted already.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 1f9b591ee66fe5abd6f63990b085e1f1f559d8d9 by lebedev.ri
[SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same predecessor more than once.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit f8875c313c381764a9734dbd6e94539e8837d9f7 by lebedev.ri
[NFC][SimplifyCFG] Add test with an unreachable block with two identical successors
The file was addedllvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll
Commit 7600d7c7be07ee78543522d0fbd1e92e672a0327 by lebedev.ri
[SimplifyCFG] removeUnreachableBlocks(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same predecessor more than once.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 6984781df9b584febce51b7740c8738a076f5692 by lebedev.ri
[NFC][SimplifyCFG] Add a test with an undef cond branch to identical destinations
The file was addedllvm/test/Transforms/SimplifyCFG/change-to-unreachable-matching-successor.ll
Commit 05adc73db053fd79e64901e359e6ee783d772a80 by lebedev.ri
[SimplifyCFG] changeToUnreachable(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same predecessor more than once.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 66189212bbb0351ae98bbda70bd2cd819e86fd17 by lebedev.ri
[SimplifyCFG] MergeBlockIntoPredecessor(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same successor more than once.
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Commit be0a31d13bcf28577f65b8e189a8bb105b000274 by lebedev.ri
[SimplifyCFG] DeleteDeadBlocks(): switch to non-permissive DomTree updates

No actual changes needed, DetatchDeadBlocks() was already doing the right thing.
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Commit f0eba8ce2d4027a890751b7617e98730d7d682f6 by lebedev.ri
[SimplifyCFG] changeToCall(): switch to non-permissive DomTree updates

No actual changes needed, normal and unwind destinations of an invoke
can never be identical.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit d59f97bb3a652565ac074e76da2b6b54816880f3 by lebedev.ri
[SimplifyCFG] removeUnwindEdge(): switch to non-permissive DomTree updates

No actual changes needed, Catchswitch cannot unwind to one of its catchpads.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit f2f81c554b0d38edf754a220bcb063876747ee6b by lebedev.ri
[SimplifyCFG] markAliveBlocks(): switch to non-permissive DomTree updates

No actual changes needed, invoke can't have the same block as an unwind
destination and a normal destination.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 946bc50e4cbbc998c77e091c7956e996a7d409f0 by evandro.menezes
[RISCV] Define the vfsqrt RVV intrinsics

Define the `vfsqrt` IR intrinsics for the respective V instructions.

Authored-by: Roger Ferrer Ibanez <rofirrim@gmail.com>
Co-Authored-by: Evandro Menezes <evandro.menezes@sifive.com>

Differential Revision: https://reviews.llvm.org/D93745
The file was modifiedllvm/include/llvm/IR/IntrinsicsRISCV.td
The file was addedllvm/test/CodeGen/RISCV/rvv/vfsqrt-rv32.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/vfsqrt-rv64.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Commit 6acfc3a78210639367ab8345a9af04e97692a661 by alexandre.ganea
Fix build after eaadb41db6233cf1c9e882d74a31c1f9d6e211ff when the MSVC libs are not in PATH.
The file was modifiedlld/test/COFF/precomp-ghash.test
Commit 8dddcc762dd98d53b9406b36e92f62502834187c by ruiling.song
[Cloning] Copy metadata of global declarations

We have modules with metadata on declarations, and out-of-tree passes
use that metadata, and we need to clone those modules. We really expect
such metadata is kept during the clone operation.

Reviewed by: arsenm, aprantl

Differential Revision: https://reviews.llvm.org/D93451
The file was addedllvm/test/Other/copy-metadata-of-declaration.ll
The file was modifiedllvm/lib/Transforms/Utils/CloneModule.cpp