[ARM][GlobalISel] Remove dependency on legal ruleset. (#197370)
This fills in always legal rules, to remove the dependency on the legacy
ruleset. The trunc rule might make some differences but it looks like
i64 zext / sext are not well supported at the moment. This is not
guaranteed to be all the rules, just the ones that appear in tests.
[clang][AArch64] Use structured bindings in feature parsing code (#197689)
Clearer than having to know that first is a CPU and second is the
feature list.
[PowerPC] Match intrinsics ppc_amo_st[dw]at with a pattern
The intrinsics are 1:1 to the instructions except for the order of
the operands, thus it is easy to match them with a pattern.
However, the intrinsics are defined as reading and writing to
memory, but the instructions explicitly set mayLoad to false.
Looking at the ISA description it seems to me that the latter
is not true. In any case, the side effect flags must be the
same, otherwise the pattern is rejected.
[libc] Annex K: Add constraint handler unit test class
This unit test class will be useful for the tests related to Annex K.
The functions in Annex K may call a constraint handler, so this new unit
test class will facilitate the checks that the constraint handling
mechanism is working as expected.
[libc++] Replace ranges::find_first_of with std::find_first_of in __try_constant_folding (#197641)
This reduces the time it takes to instantiate `std::format` from ~160ms
to ~120ms in my testing.
[AMDGPU][NFC] Remove redundant hasMadU64U32NoCarry helper (#197682)
Use hasMadNC64_32Insts() (backed by SubtargetFeature) for MAD 64_32
no-carry and drop the old helper.
[libc] Include correct headers in type_traits (#197691)
Otherwise we end up with errors like the following when building with
bazel:
```c++
In file included from external/+_repo_rules+llvm-project/libc/src/__support/CPP/type_traits/is_move_constructible.h:12:
external/+_repo_rules+llvm-project/libc/src/__support/CPP/type_traits/is_constructible.h:32:14: error: no template named 'bool_constant'
32 | : public bool_constant<__is_constructible(T, Args...)> {};
```
[DAG] SimplifyMultipleUseDemandedBits - fold (mul X, 1) -> X (#197677)
Use DemandedElts + KnownBits to match hidden identity patterns - helps
especially with reduction patterns padded by legalisation
Once #197455 has landed, I'm intending to convert this (plus
SMIN/SMAX/UMIN/UMAX and the existing ISD::ADD case) to use
isIdentityElement directly.
[LV][NFC] Remove instcombine from RUN lines in AArch64 tests (#197448)
This PR continues other work I've been doing trying to remove
unnecessary extra passes from the RUN lines in order to make it easier
to map the expected vectoriser output to the CHECK lines. As a result it
has exposed some potential optimisations that we may be able to perform
in VPlan.
Here is a summary of the changes I've noticed:
1. instcombine likes to canonicalise GEPs into certain forms. I'm not
sure if there is value in VPlan trying to guess what the canonical form
should be.
2. In tests like sve-cond-inv-loads.ll, etc. the pattern sub(urem) is
often replaced with and(sub). This is potentially something the
vectoriser could improve although I don't know if it would change the
cost model.
3. There is poor codegen in gather_nxv4i32_ind64_stride2 in the file
sve-gather-scatter.ll, which is due to
[19 lines not shown]
[PowerPC] Update base crypto builtins and intrinsics (#197017)
Update the base crypto builtins and LLVM intrinsics to drop the mma_
prefix. Also fix the builtin definitions for dmsha2hash, dmsha3hash,
and dmxxshapad to use the correct immediate constraints.
[CodeGen] Debug insns must not affect liveness analysis (#193104)
Register references in debug instructions can affect LiveRegUnits
analysis. Skip over debug instructions.
Tests in this PR would fail due to calls to LiveRegUnits::stepBackward
in RegisterScavenging, DeadMachineInstructionElim, and
AArch64InstrInfo.cpp getOutlinableRanges().
Other call-sites to stepBackward may also pass debug instructions to
LiveRegUnits::stepBackward, but LIT testing did not fail when
-debugify-and-strip-all-safe was enabled by default.
---------
Signed-off-by: John Lu <John.Lu at amd.com>
[clang] NFC: add asserts enforcing template parameters have valid positions
Some tests are violating these assertions, so they are commented out.
For the test in `clang/test/SemaTemplate/concepts.cpp`, that was broken by #195995
and needs a partial revert at least.
[clang] CTAD: fix transformation of template template parameters (#197611)
This fixes the CTAD template parameter transforms so they produce
template template parameters which have correct depth for their own
template parameters.
This also stops calling SubstDecl directly on the non-type template
parameters, so that a template parameter with correct position is
produced directly, instead of manually fixing that up later. This helps
#197598 by making it possible to add assertions that the positions are
always valid.
[AArch64][GlobalISel] Add always legal action builders. (#197238)
This defined some always legal actions, removing our dependency on the
Legacy ruleset in aarch64.
[AMDGPU][NFC] Remove redundant hasMadU64U32NoCarry helper
Use hasMadNC64_32Insts() (backed by SubtargetFeature) for MAD 64_32
no-carry and drop the old helper.
[NFC] Format two AMDGPU files (#197672)
- `llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp`
- `llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp`
[UniformityAnalysis] Fix nodivergencesource calls (#197656)
NFC #168903 introduced a subtle behavior change for calls with the
nodivergencesource attribute and divergent operands.
Calls with the nodivergencesource attribute are *not* always uniform.
They just do not introduce any new divergence. If any operand is
divergent,
the result must still be reported as divergent.
Revert to pre-#168903 behavior by allowing the standard propagation to
work for target's NeverUniform while keeping Default and AlwaysUniform
unchanged.