[PATCH] D35146: AMDGPU : Widen extending scalar loads to 32-bits

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 11:47:53 PDT 2017


arsenm added a comment.

This needs a dedicated test



================
Comment at: lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp:452
+  if (I.getPointerAddressSpace() == AMDGPUASI.CONSTANT_ADDRESS &&
+      !I.isVolatile() && (!VT || (VT && VT->getBitWidth() < 32)) &&
+      needsPromotionToI32(I.getType()) && DA->isUniform(&I)) {
----------------
This should be able to handle vectors. This should also use the DataLayout so it works for pointers


================
Comment at: lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp:456
+    Builder.SetCurrentDebugLocation(I.getDebugLoc());
+    Type *I32Ty = getI32Ty(Builder, I.getType());
+    Type *PT = PointerType::get(I32Ty, I.getPointerAddressSpace());
----------------
getI32Ty is the wrong thing to use here


Repository:
  rL LLVM

https://reviews.llvm.org/D35146





More information about the llvm-commits mailing list