[llvm] [NVPTX] fold movs into loads and stores (PR #144581)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 13:37:32 PDT 2025


================
@@ -3464,19 +3464,16 @@ SDValue NVPTXTargetLowering::LowerFormalArguments(
       unsigned I = 0;
       for (const unsigned NumElts : VectorInfo) {
         const EVT EltVT = VTs[I];
-        const EVT LoadVT = [&]() -> EVT {
-          // i1 is loaded/stored as i8.
-          if (EltVT == MVT::i1)
-            return MVT::i8;
-          // getLoad needs a vector type, but it can't handle
-          // vectors which contain v2f16 or v2bf16 elements. So we must load
-          // using i32 here and then bitcast back.
-          if (EltVT.isVector())
-            return MVT::getIntegerVT(EltVT.getFixedSizeInBits());
-          return EltVT;
-        }();
+        // i1 is loaded/stored as i8
----------------
AlexMaclean wrote:

How is this change related to the rest of the patch?

https://github.com/llvm/llvm-project/pull/144581


More information about the llvm-commits mailing list