[llvm] [VectorCombine][TTI] Disable Load Widening for SPIR-V (PR #227623)
Gregory Roth via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 04:16:38 PDT 2026
pow2clk wrote:
> > > Can't you just adjust the costs with SPIRVTTIImpl::getMemoryOpCost?
I'm afraid this may not actually have sufficient information to determine that the changed load is invalid. It's not that vectors can't be loaded, they just can't be loaded from a scalar pointer type in SPIR-V. The calls to calculate the [NewCost](https://github.com/llvm/llvm-project/blob/d9b12f5c63ff211229a1809a6878c32fc166c14a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp#L334) only includes the opcode and type. If I passed in the original instruction as the optional parameter, I could compare those, but I don't think that's how that parameter is meant to work.
Note that the newest commit makes no changes based on this discussion, but just fixes the undefs in the test.
https://github.com/llvm/llvm-project/pull/227623
More information about the llvm-commits
mailing list