[llvm] [VectorCombine][AMDGPU] Shrink demanded vector loads (PR #202501)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 02:04:52 PDT 2026
tianhbai wrote:
I updated the patch to narrow the scope as suggested.
Main changes:
- Removed the custom `shouldReduceLoadWidth` TTI hook.
- Use `getMemoryOpCost` instead, with an AMDGPU throughput-cost refinement for vector loads.
- `VectorCombine` now only changes the vector element count. It no longer changes element type and no longer uses `DemandedBits`.
- The previous sub-element `i64 -> i32` chunking path is gone. There is now a negative test to make sure this does not happen in this transform.
- Added/updated tests for pointer element types, `<1 x ...>` vectors, variable and OOB extract indices, volatile and atomic loads, singleton demanded runs, sub-byte element types, `!range` / `!noundef` metadata, and adjusted TBAA/AAMD metadata.
- The test checks are autogenerated.
On `!nonnull` metadata: I did not add a vector-of-pointer `!nonnull` test because the verifier rejects `!nonnull` on `load <N x ptr>` with `nonnull applies only to pointer types`. The pointer-vector test covers `!noundef` instead.
https://github.com/llvm/llvm-project/pull/202501
More information about the llvm-commits
mailing list