[PATCH] D138215: [AMDGPU][CodeGen] Support raw format TFE buffer loads other than byte, short and d16 ones.

Ivan Kosarev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 05:10:26 PST 2022


kosarev marked an inline comment as done.
kosarev added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:4555
+    if (IsD16) {
+      assert(!IsTFE);
+      Opc = AMDGPU::G_AMDGPU_BUFFER_LOAD_FORMAT_D16;
----------------
arsenm wrote:
> If this isn't supposed to work, should return false for the fallback 
What's the fallback? From what I see if we do not stop here, it will just crash later on a less specific check not being able to legalise the call.


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.struct.buffer.load.format.ll:337
+declare { i32, i32 } @llvm.amdgcn.struct.buffer.load.format.sl_i32i32s(<4 x i32>, i32, i32, i32, i32 immarg) #0
 
 attributes #0 = { nounwind readonly }
----------------
arsenm wrote:
> Can you also add i16 and f16 cases?
The title says it that this is not supposed to support d16 cases. We would just crash on these.


================
Comment at: llvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.format.ll:232
+declare { float, i32 } @llvm.amdgcn.struct.buffer.load.format.sl_f32i32s(<4 x i32>, i32, i32, i32, i32 immarg) #0
 
 attributes #0 = { nounwind readonly }
----------------
arsenm wrote:
> Ditto, i16 and f16 cases
Answered above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138215/new/

https://reviews.llvm.org/D138215



More information about the llvm-commits mailing list