summaryrefslogtreecommitdiff
path: root/test/CodeGen/R600
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-18 20:09:50 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-18 20:09:50 +0000
commit9bc4b2c0dae143e72624984dfd5e3a4ff2e95eb2 (patch)
tree5baea4374ebd24584f024cd04465c16534f62fbe /test/CodeGen/R600
parente64a2896094be370f5ca3d755f62c762fb94b37a (diff)
downloadllvm-9bc4b2c0dae143e72624984dfd5e3a4ff2e95eb2.tar.gz
llvm-9bc4b2c0dae143e72624984dfd5e3a4ff2e95eb2.tar.bz2
llvm-9bc4b2c0dae143e72624984dfd5e3a4ff2e95eb2.tar.xz
R600/SI: Fix multiple SGPR reads when using VCC.
No other SGPR operands are allowed, so if VCC is used, move the other to a VGPR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/R600')
-rw-r--r--test/CodeGen/R600/add_i64.ll21
1 files changed, 18 insertions, 3 deletions
diff --git a/test/CodeGen/R600/add_i64.ll b/test/CodeGen/R600/add_i64.ll
index 1f846b4ed3..c5c2a11e62 100644
--- a/test/CodeGen/R600/add_i64.ll
+++ b/test/CodeGen/R600/add_i64.ll
@@ -18,13 +18,28 @@ define void @test_i64_vreg(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noa
ret void
}
-; SI-LABEL: @test_i64_sreg:
-define void @test_i64_sreg(i64 addrspace(1)* noalias %out, i64 %a, i64 %b) {
- %result = add i64 %a, %b
+; SI-LABEL: @one_sgpr:
+define void @one_sgpr(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noalias %in, i64 addrspace(1)* noalias %in_bar, i64 %a) {
+ %foo = load i64 addrspace(1)* %in, align 8
+ %result = add i64 %foo, %a
store i64 %result, i64 addrspace(1)* %out
ret void
}
+; FIXME: This case is broken
+;
+; Swap the arguments. Check that the SGPR -> VGPR copy works with the
+; SGPR as other operand.
+;
+; XXXSI-LABEL: @one_sgpr_reversed:
+; define void @one_sgpr_reversed(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noalias %in, i64 %a) {
+; %foo = load i64 addrspace(1)* %in, align 8
+; %result = add i64 %a, %foo
+; store i64 %result, i64 addrspace(1)* %out
+; ret void
+; }
+
+
; SI-LABEL: @test_v2i64_sreg:
define void @test_v2i64_sreg(<2 x i64> addrspace(1)* noalias %out, <2 x i64> %a, <2 x i64> %b) {
%result = add <2 x i64> %a, %b