diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-18 20:09:55 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-18 20:09:55 +0000 |
commit | 3560dd2dcd67d42eeb8e59975581d598d71669df (patch) | |
tree | 518c73d7a58dc375519d301a21419de310fd1997 /test/CodeGen/R600/add_i64.ll | |
parent | 9bc4b2c0dae143e72624984dfd5e3a4ff2e95eb2 (diff) | |
download | external_llvm-3560dd2dcd67d42eeb8e59975581d598d71669df.zip external_llvm-3560dd2dcd67d42eeb8e59975581d598d71669df.tar.gz external_llvm-3560dd2dcd67d42eeb8e59975581d598d71669df.tar.bz2 |
R600/SI: Fix moveToVALU when the first operand is VSrc.
Moving into a VSrc doesn't always work, since it could be
replaced with an SGPR later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195042 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/R600/add_i64.ll')
-rw-r--r-- | test/CodeGen/R600/add_i64.ll | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/CodeGen/R600/add_i64.ll b/test/CodeGen/R600/add_i64.ll index c5c2a11..303a1cb 100644 --- a/test/CodeGen/R600/add_i64.ll +++ b/test/CodeGen/R600/add_i64.ll @@ -18,26 +18,25 @@ define void @test_i64_vreg(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noa ret void } -; 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) { +; Check that the SGPR add operand is correctly moved to a VGPR. +; SI-LABEL: @sgpr_operand: +define void @sgpr_operand(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: @sgpr_operand_reversed: +define void @sgpr_operand_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: |