[SimplifyCFG] Simplify identical predecessors (#173022)
When >1 predecessors of BB are identical, try to merge them into ONE.
---
Here is a simplified example (`sink` and `bb*`s share the same
predecessor `entry`, hindering the existing uncond br folding to
optimize such a case):
```diff
- entry:
- switch to %br1, %br2, %br3, %sink
- bb1:
- br label %sink
- bb2:
- br label %sink
- bb3:
- br label %sink
[25 lines not shown]
libclc: Update f64 log implementations
The log implementation was originally ported from
rocm device libs way back in 44b6117dfde30d6cc292fabca8ecb0cef4657f7a.
Update this to a version derived from the latest. Leaves the float and
half cases alone.
libclc: Update ilogb implementation (#185877)
This was originally ported from rocm device libs in
d6d0454231ac489c50465d608ddf3f5d900e1535. Update for
more recent changes that were made there. This avoids
bithacking and improves value tracking. This also allows
using a common code path for all types.
libclc: Update ilogb implementation
This was originally ported from rocm device libs in
d6d0454231ac489c50465d608ddf3f5d900e1535. Update for
more recent changes that were made there. This avoids
bithacking and improves value tracking. This also allows
using a common code path for all types.
[RISCV] Add register group overlap checks to the assembler for vector indexed segment load (#184963)
https://github.com/llvm/llvm-project/commit/f7ca74f600cb6360b4255fc849ac21dd13a56a4c
has added basic check for register overlap.
Furthermore, we need to add extra check for register group overlap since
more registers will be occupied in segment load.
[Clang][Test] Mark modules-symlink-dir test as unsupported on AIX. (#184988)
This change marks the test
`modules-symlink-dir-from-module-incremental.c` as "unsupported" on AIX.
The test relies on the -F flag to specify framework search paths, which
is a driver feature exclusive to Darwin, and it is not supported on the
AIX target.
Co-authored-by: Aditya Chaudhary <aditya.chaudhary1 at ibm.com>
[X86] Remove `NoSignedZerosFPMath` uses (#163902)
Remove `NoSignedZerosFPMath` uses, one of flags in `resetTargetOptions`,
users should use `nsz` instead.
[CIR][AMDGPU] Add AMDGPU target support to CIR CodeGen (#185819)
This PR adds AMDGPUTargetCIRGenInfo and AMDGPUABIInfo to handle the
amdgcn triple in CIR code generation, along with a
basic HIP codegen test.
[WinEH] Fix crash when aligning parameters larger than ABI (#180905)
Fix #180648 caused by an unhandled `Argument` for parameters exceeding
ABI size limits. This patch explicitly emits an `alloca` for the `Argument` in
the entry block to ensure correct address resolution.
[Clang][layout] Update tests after #182792 (#186019)
\#182792 makes it so that these structs have an alignment of 1. This
needs to be fixed in a recently added test (landed after the most recent
premerge run of the test).
This test update is expected behavior.
[CodeGen][TTI] Reduce funnel shift cost for constant shift amounts (#184942)
The Sub instruction cost and the shift-by-zero handling costs (ICmp +
Select) are only needed when the shift amount is non-constant. Move them
inside the `!OpInfoZ.isConstant()` guard to avoid overestimating cost
for constant shift amounts.
The overestimated scalar cost caused SLP vectorizer to incorrectly
prefer vectorizing funnel shifts with constant shift amounts, since SLP
compares vector cost against scalar cost and a falsely high scalar cost
makes vectorization appear more profitable than it actually is.
Fixes #181308.
[RISCV] Update Andes45 vector permutation scheduling info (#185591)
This PR adds latency/throughput for all RVV permutation instructions to
the andes45 series scheduling model.
We use the default cycle for permutation instructions since we are
unable to model the Latency and ReleaseAtCycles accurately now.
[clang-tidy] Fix spurious errors from builtin macros in modernize-use-trailing-return-type (#184022)
## Summary
I hit the same issue as in #168360 when upgrading to LLVM 21 with
clang-tidy reporting cryptic:
`error: missing '(' after '__has_feature'`
Further investigation confirmed that the issue is localized to
`modernize-use-trailing-return-type` and only happens with C++20+ and llvm
21 system headers (where `__has_feature` started to be used by libc++).
Initial non-localized repro had this error firing 7k+ on LLVM 21, but
when I switched to HEAD the incidence dropped to just 5 'check()' calls
firing. The drop in incidence is likely to be related to
https://github.com/llvm/llvm-project/pull/151035 as there are no other
plausibly relevant changes.
However, as I was still hitting the issue with HEAD, this helped develop
[20 lines not shown]
Fix packed being ignored on ms_struct bitfields (#182792)
For ms_struct structs on Itanium layout targets, the packed attribute is
ignored on bit-fields (2014 commit
76e1818a2b1248579557de2927c135c322577c82), mismatching the GCC behavior.
Remove the `!IsMsStruct` guard to fix it.