diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-07-01 22:55:55 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-07-01 22:55:55 +0000 |
commit | 8af47a09e5e91e7ea8845d9403f06766f05b5395 (patch) | |
tree | 8bd1f77af3ae56b28f77f886977099ed3429c05d /llvm/test/CodeGen/AMDGPU/sext-in-reg-failure-r600.ll | |
parent | 53547d95ca31ad404a1846500ecea6417817cd6d (diff) | |
download | bcm5719-llvm-8af47a09e5e91e7ea8845d9403f06766f05b5395.tar.gz bcm5719-llvm-8af47a09e5e91e7ea8845d9403f06766f05b5395.zip |
AMDGPU: Expand unaligned accesses early
Due to visit order problems, in the case of an unaligned copy
the legalized DAG fails to eliminate extra instructions introduced
by the expansion of both unaligned parts.
llvm-svn: 274397
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/sext-in-reg-failure-r600.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/sext-in-reg-failure-r600.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/sext-in-reg-failure-r600.ll b/llvm/test/CodeGen/AMDGPU/sext-in-reg-failure-r600.ll new file mode 100644 index 00000000000..08bdc3aba55 --- /dev/null +++ b/llvm/test/CodeGen/AMDGPU/sext-in-reg-failure-r600.ll @@ -0,0 +1,22 @@ +; XFAIL: * +; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s +; XUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG %s +; +; EG-LABEL: {{^}}sext_in_reg_v2i1_in_v2i32_other_amount: +; EG: MEM_{{.*}} STORE_{{.*}} [[RES:T[0-9]+]]{{\.[XYZW][XYZW]}}, [[ADDR:T[0-9]+.[XYZW]]] +; EG-NOT: BFE +; EG: ADD_INT +; EG: LSHL +; EG: ASHR [[RES]] +; EG: LSHL +; EG: ASHR [[RES]] +; EG: LSHR {{\*?}} [[ADDR]] + +; Works with the align 2 removed +define void @sext_in_reg_v2i1_in_v2i32_other_amount(<2 x i32> addrspace(1)* %out, <2 x i32> %a, <2 x i32> %b) nounwind { + %c = add <2 x i32> %a, %b + %x = shl <2 x i32> %c, <i32 6, i32 6> + %y = ashr <2 x i32> %x, <i32 7, i32 7> + store <2 x i32> %y, <2 x i32> addrspace(1)* %out, align 2 + ret void +} |