summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/extload.ll
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-02-22 21:04:23 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-02-22 21:04:23 +0000
commitd85e5a13039be71acd0ddc7ad4c53dd4671ecbe3 (patch)
tree43754b3449d9139a3f441f13a6468ad9bb673835 /llvm/test/CodeGen/AMDGPU/extload.ll
parentfa67bdbde06f330a7d0c1ced7023951f6a238b8e (diff)
downloadbcm5719-llvm-d85e5a13039be71acd0ddc7ad4c53dd4671ecbe3.tar.gz
bcm5719-llvm-d85e5a13039be71acd0ddc7ad4c53dd4671ecbe3.zip
AMDGPU: Fix alignments in test
I don't think this test was intending to test unaligned load/store. Change it to use the natural alignment to avoid regressing. Also adds missing SI checks. llvm-svn: 261571
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/extload.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/extload.ll34
1 files changed, 22 insertions, 12 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/extload.ll b/llvm/test/CodeGen/AMDGPU/extload.ll
index 662eb7a9716..b8d7d56722a 100644
--- a/llvm/test/CodeGen/AMDGPU/extload.ll
+++ b/llvm/test/CodeGen/AMDGPU/extload.ll
@@ -1,53 +1,63 @@
-; RUN: llc -march=r600 -mcpu=cypress < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
-; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
+; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs< %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
+; RUN: llc -march=r600 -mcpu=cypress < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
; FUNC-LABEL: {{^}}anyext_load_i8:
+; SI: buffer_load_dword v{{[0-9]+}}
+; SI: buffer_store_dword v{{[0-9]+}}
+
; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+.[XYZW]]],
; EG: VTX_READ_32 [[VAL]]
-
define void @anyext_load_i8(i8 addrspace(1)* nocapture noalias %out, i8 addrspace(1)* nocapture noalias %src) nounwind {
%cast = bitcast i8 addrspace(1)* %src to i32 addrspace(1)*
- %load = load i32, i32 addrspace(1)* %cast, align 1
+ %load = load i32, i32 addrspace(1)* %cast
%x = bitcast i32 %load to <4 x i8>
%castOut = bitcast i8 addrspace(1)* %out to <4 x i8> addrspace(1)*
- store <4 x i8> %x, <4 x i8> addrspace(1)* %castOut, align 1
+ store <4 x i8> %x, <4 x i8> addrspace(1)* %castOut
ret void
}
; FUNC-LABEL: {{^}}anyext_load_i16:
+; SI: buffer_load_dword v{{[0-9]+}}
+; SI: buffer_store_dword v{{[0-9]+}}
+
; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+.[XYZW]]],
; EG: VTX_READ_32 [[VAL]]
-
define void @anyext_load_i16(i16 addrspace(1)* nocapture noalias %out, i16 addrspace(1)* nocapture noalias %src) nounwind {
%cast = bitcast i16 addrspace(1)* %src to i32 addrspace(1)*
- %load = load i32, i32 addrspace(1)* %cast, align 1
+ %load = load i32, i32 addrspace(1)* %cast
%x = bitcast i32 %load to <2 x i16>
%castOut = bitcast i16 addrspace(1)* %out to <2 x i16> addrspace(1)*
- store <2 x i16> %x, <2 x i16> addrspace(1)* %castOut, align 1
+ store <2 x i16> %x, <2 x i16> addrspace(1)* %castOut
ret void
}
; FUNC-LABEL: {{^}}anyext_load_lds_i8:
+; SI: ds_read_b32 v{{[0-9]+}}
+; SI: ds_write_b32 v{{[0-9]+}}
+
; EG: LDS_READ_RET {{.*}}, [[VAL:T[0-9]+.[XYZW]]]
; EG: LDS_WRITE * [[VAL]]
define void @anyext_load_lds_i8(i8 addrspace(3)* nocapture noalias %out, i8 addrspace(3)* nocapture noalias %src) nounwind {
%cast = bitcast i8 addrspace(3)* %src to i32 addrspace(3)*
- %load = load i32, i32 addrspace(3)* %cast, align 1
+ %load = load i32, i32 addrspace(3)* %cast
%x = bitcast i32 %load to <4 x i8>
%castOut = bitcast i8 addrspace(3)* %out to <4 x i8> addrspace(3)*
- store <4 x i8> %x, <4 x i8> addrspace(3)* %castOut, align 1
+ store <4 x i8> %x, <4 x i8> addrspace(3)* %castOut
ret void
}
; FUNC-LABEL: {{^}}anyext_load_lds_i16:
+; SI: ds_read_b32 v{{[0-9]+}}
+; SI: ds_write_b32 v{{[0-9]+}}
+
; EG: LDS_READ_RET {{.*}}, [[VAL:T[0-9]+.[XYZW]]]
; EG: LDS_WRITE * [[VAL]]
define void @anyext_load_lds_i16(i16 addrspace(3)* nocapture noalias %out, i16 addrspace(3)* nocapture noalias %src) nounwind {
%cast = bitcast i16 addrspace(3)* %src to i32 addrspace(3)*
- %load = load i32, i32 addrspace(3)* %cast, align 1
+ %load = load i32, i32 addrspace(3)* %cast
%x = bitcast i32 %load to <2 x i16>
%castOut = bitcast i16 addrspace(3)* %out to <2 x i16> addrspace(3)*
- store <2 x i16> %x, <2 x i16> addrspace(3)* %castOut, align 1
+ store <2 x i16> %x, <2 x i16> addrspace(3)* %castOut
ret void
}
OpenPOWER on IntegriCloud