[PATCH] D20637: AMDGPU: Temporary fix for broken store combine

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 12:23:39 PDT 2016


arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm.

http://reviews.llvm.org/D20637

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  test/CodeGen/AMDGPU/load.ll

Index: test/CodeGen/AMDGPU/load.ll
===================================================================
--- test/CodeGen/AMDGPU/load.ll
+++ test/CodeGen/AMDGPU/load.ll
@@ -181,6 +181,19 @@
   ret void
 }
 
+; FUNC-LABEL: {{^}}global_load_v3i16:
+; SI-NOHSA: buffer_load_dwordx2 v
+; SI-HSA: flat_load_dwordx2 v
+
+; R600-DAG: VTX_READ_32
+; R600-DAG: VTX_READ_16
+define void @global_load_v3i16(<3 x i16> addrspace(1)* %out, <3 x i16> addrspace(1)* %in) {
+entry:
+  %ld = load <3 x i16>, <3 x i16> addrspace(1)* %in
+  store <3 x i16> %ld, <3 x i16> addrspace(1)* %out
+  ret void
+}
+
 ; FUNC-LABEL: {{^}}load_v4i16:
 ; R600: VTX_READ_16
 ; R600: VTX_READ_16
Index: lib/Target/AMDGPU/AMDGPUISelLowering.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -2192,6 +2192,8 @@
     return SDValue();
 
   EVT MemVT = LoadVal->getMemoryVT();
+  if (!MemVT.isRound())
+    return SDValue();
 
   SDLoc SL(N);
   SelectionDAG &DAG = DCI.DAG;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20637.58470.patch
Type: text/x-patch
Size: 1050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160525/2447204e/attachment.bin>


More information about the llvm-commits mailing list