[PATCH] D20032: AMDGPU/R600: Use correct number of vector elements when lowering private loads

Jan Vesely via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 05:24:25 PDT 2016


jvesely added inline comments.

================
Comment at: lib/Target/AMDGPU/R600ISelLowering.cpp:1664
@@ -1663,3 +1663,3 @@
     EVT ElemVT = VT.getVectorElementType();
-    SDValue Loads[4];
+    SmallVector<SDValue, 4> Loads(NumElemVT);
 
----------------
jvesely wrote:
> arsenm wrote:
> > Why is this being hit for > 4 elements? Those should have been split up during type legalization already by the time it reaches here
> You're right, it's not. I realized it during testing. Keeping SDValue [4] and using makeArrayRef(Loads, NumElementVT) works too. SmallVector seemed a bit more robust.
would you prefer if I changed the approach to makeArrayRef, or removed the v16 tests from this patch?


Repository:
  rL LLVM

http://reviews.llvm.org/D20032





More information about the llvm-commits mailing list