[clang] [llvm] [NVPTX] Support i256 load/store with 256-bit vector load (PR #155198)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 15:36:26 PDT 2025
================
@@ -198,6 +198,12 @@ static bool IsPTXVectorType(MVT VT) {
static std::optional<std::pair<unsigned int, MVT>>
getVectorLoweringShape(EVT VectorEVT, const NVPTXSubtarget &STI,
unsigned AddressSpace) {
+ const bool CanLowerTo256Bit = STI.has256BitVectorLoadStore(AddressSpace);
+
+ if (CanLowerTo256Bit && VectorEVT.isScalarInteger() &&
+ VectorEVT.getSizeInBits() == 256)
----------------
Artem-B wrote:
Nit: no point checking if 256 bit ld/st are supported if we're operating ont he wrong size. I'd just fold the STI call into the if as the last condition.
https://github.com/llvm/llvm-project/pull/155198
More information about the llvm-commits
mailing list