[NFC][AMDGPU] Add comments for literal arguments of WMMA profiles (#174175)
Otherwise it is really hard to understand what those 0s and 1s correpond
to what.
[mlir][SPIRV] Move getDecorationString to common utilities. (#174145)
Moved getDecorationString() utility function from ArithToSPIRV.cpp to
the common SPIRVCommon/Pattern.h header to make it reusable across
SPIR-V conversion passes.
[mlir][Transforms][NFC] `remove-dead-values`: Erase ops at the end (#174208)
`remove-dead-values` performs various cleanups:
1. Erasing block arguments
2. Erasing successor operands
3. Erasing operations
4. Erasing function arguments / results
5. Erasing operands
6. Erasing results
This commit moves Step 3 (erasing operations) to the end. While that
does not fix any bugs by itself, it is potentially safer. If an
operation is erased, we must be careful that the operation is not
accessed in the following steps. That can no longer happen if IR is
erased only in the final step and not before.
This commit is prefetching a change from #173505 (to keep that PR
shorter). With #173505, it will become necessary to erase IR in the
final step.
ValueTracking: Improve handling of fadd in computeKnownFPClass.
This already recognized that if both inputs are positive, the
result is positive. Extend this to the mirror situation with
negative inputs.
Also special case fadd x, x. Canonically, fmul x, 2 is fadd x, x.
We can tell the sign bit won't change, and 0 will propagate.
ValueTracking: Add more baseline tests for computeKnownFPClass of fadd
Test cases with fadd x, x. Also test cases where both inputs are known
negative.
[VectorCombine] scalarizeExtExtract - create bitmasks with APInt::getLowBitsSet to avoid UB (#174202)
If we're dealing with uint64 elements or larger, the existing `(1ull <<
SrcEltSizeInBits) - 1` mask can cause UB.
Fixes #174046
[PAC][libunwind] Pass ptrauth-qualified values as const references (#173765)
For Apple's arm64e or Linux's pauthtest, `Registers_arm64::link_reg_t`
type is `__ptrauth`-qualified. When passing a value of such a type to a
function accepting non-`__ptrauth`-qualified parameter with `pint_t`
type, an authentication is performed. So, the corresponding callee
argument does not contain an embedded signature, making it prone to
substitution if spilled to the stack.
This patch prevents early authentication of signed values of
`link_reg_t` type by passing them as const l-value references instead of
passing by value with type `pint_t`. This way, the callee would operate
with a `__ptrauth`-qualified value containing a signature, allowing to
detect a substitution if the value is spilled to the stack.
Note that this approach was introduced previously in #143230 for some
other functions. In this patch, we apply the approach to the functions
which were not considered previously.