[NFC][LLVM][ConstantFolding] Use Type* variant of ConstantFP::get when folding scalar intrinsics. (#172709)
This gives peace of mind the code paths will remain valid if enabled for vector types and -use-constant-fp-for-*-splat enabled.
[AArch64][GlobalISel] Added test coverage for sri intrinsic
Previously, generation of sri intrinsics was tested during the ACLE -> IR stage, but not in the IR -> MIR stage. Now, correct generation of sri intrinsics is tested in both stages.
[X86] vselect-pcmp.ll - add test showing failure to fold icmp_eq(and(x,pow2),0) to shl(x,c) for v4f32 select masks (#173359)
Noticed while trying to tweak backend folds to workaround #172888
[LLVM][DAGCombiner] Look through freeze when combining extensions of extending-masked-loads. (#172484)
Extensions in this context mean post legalisation extensions (i.e. and,
sext-in-reg) because that's the point the freeze blocks the existing
combine.
AMDGPU: Stop requiring afn for f32 rsq formation
We were checking for afn or !fpmath attached to the sqrt. We
are not trying to replace a correctly rounded rsqrt; we're replacing
the two correctly rounded operations with the contracted operation.
It's net a better precision, so contract on both instructions should
be sufficient. Both the contracted and uncontracted sequences pass
the OpenCL conformance test, with a lower maximum error contracted.
[SPIRV] Add support for non-interposable function aliases (#172730)
The backend was not handling GlobalAliases such as in call targets. This
patch pre-processes the aliases in the module and resolve them to their
aliasee when possible. The patch also documents those cases that are not
yet supported.
[Clang] Serialize expansions of PackIndexingType (#173351)
We have already serialized isFullySubstituted, which hinges on the
expansions; if they were lost, we would never expand them correctly from
an imported AST.
Sadly this bug has been around a year, so there's a release note.
Fixes #172464
[ValueTracking] Support ptrtoaddr in isKnownNonZero() (#173275)
Add support for ptrtoaddr in isKnownNonZero(). We can directly forward
to isKnownNonZero() for the pointer here, as we define nonnull as
applying to the address bits.
Also adjust the ptrtoint implementation to match, by requiring that the
result type >= address size (rather than >= pointer size). This is just
for clarity, in practice this is a non-canonical form.
[SPIRV] Add support for non-interposable function aliases
This patch implements support for calling functions through
non-interposable aliases in the SPIRV backend. Global aliases
are replaced at the IR level by their aliasee object when
possible.
Interposable aliases are explicitly not supported yet and will cause
compilation to fail. This was not supported prior to this patch.
Tests added for both the supported non-interposable case and the
unsupported interposable case.
[ADT] Make use of subsetOf and anyCommon methods of BitVector (NFC) (#170876)
Replace the code along these lines
BitVector Tmp = LHS;
Tmp &= RHS;
return Tmp.any();
and
BitVector Tmp = LHS;
Tmp.reset(RHS);
return Tmp.none();
with `LHS.anyCommon(RHS)` and `LHS.subsetOf(RHS)`, correspondingly,
which do not require creating temporary BitVector and can return early.