Reapply "[mlir][SCF] Fold unused `index_switch` results (#173560)"
This reverts commit 85bfb54f9dfcb323f7a8cbb38a264a596aa1a3d3,
i.e. it reapplies #173560 which was temporarily reverted in
[AMDGPU] Take into account amdgpu-waves-per-eu in getRegPressureLimit
The minimum occupancy computed by `getOccupancyWithWorkGroupSizes`
doesn't take into account that the user may have provided a
low-occupancy target through the amdgpu-waves-per-eu attribute.
Bound the minimum-occupancy using the maximum value in
amdgpu-waves-per-eu.
When the user specifies a small amdgpu-waves-per-eu (like "1,1"), this
results in higher vpgr limits.
This patch depends on https://github.com/llvm/llvm-project/pull/168358
to work.
Revert "[aarch64] Mix the frame pointer with the stack cookie when protecting the stack (#161114)" (#173987)
This reverts commit b6bfa856860bb4304e635102872a4c994af101b4.
This commit broke Windows on Arm bots.
[mlir][IR][NFC] Add `Block::computeBlockNumber` convenience helper (#173475)
Add a helper function to compute the number of a block. Recommended only
for debugging purposes and to print error messages.
[X86] Ensure we fold pow2 masks with the mask type, not the result type (#173984)
This was missed in #173366 when we relaxed the constraint on the types to just be the same element width
Fixes #173794
[RISCV] Add regalloc hints for BSETI/BEXTI (#173964)
This patch hints the register allocator to use the same source and
destination registers for the `BEXTI/BSETI` instructions when the
`Xqcibm` vendor extension is enabled. This enables the generation of the
compressed `QC_C_BEXTI/QC_C_BSETI` instructions when possible.
[mlir][Interfaces] Add `RegionBranchOpInterface::getSuccessorOperands` helper (#173971)
Add a helper for querying the successor operands for a region branch
`src -> dst`. Both `src` and `dst` may be the region branch op itself or
a terminator.
This helper allows users to query successor operands for the region
branch op and the terminators in a uniform way. This is similar to
`getSuccessorRegions(RegionBranchPoint)`, which works both for region
branch ops and terminators.
InstCombine: Introduce nsz flag on minimum/maximum in SimplifyDemandedFPClass
Alive isn't particularly happy with this in the case where
one of the inputs could be zero, but I think
it's wrong: https://alive2.llvm.org/ce/z/dF7V6k
nsz shouldn't permit introducing a -0 result where
there wasn't one in the input here.
[libc++][NFC] Simplify `gcd` a bit (#173570)
1. With `if constexpr` we can avoid partial specializations of
`__ct_gcd`. This patch changes it to a function template and renames it
to `__abs_in_type` to slightly improve readability.
2. `__gcd` was made non-recursive by
27a062e9ca7c92e89ed4084c3c3affb9fa39aabb, so this patch simply inlines
it into `gcd`.
[MLIR] Fix mlir-opt crash in ReshapeOpsUtils.cpp when collapse_shape index is invalid (#173791)
This patch fixes a crash occurring in mlir-opt when running
collapse_shape with an invalid index configuration. Instead of crashing,
an error message is returned to the user.
Fixes: #173567
---------
Co-authored-by: Bazinga! <akparmar004>