diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-10-11 21:03:41 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-10-11 21:03:41 +0000 |
commit | b19b474de95112f7e0fc15ab87ad284889d19cd9 (patch) | |
tree | 84cc79e1752f7679f3166f99fae2b49e2e30fac9 /test | |
parent | 2ad612a9e710fe42a22f7625345372fb4db9e744 (diff) | |
download | external_llvm-b19b474de95112f7e0fc15ab87ad284889d19cd9.zip external_llvm-b19b474de95112f7e0fc15ab87ad284889d19cd9.tar.gz external_llvm-b19b474de95112f7e0fc15ab87ad284889d19cd9.tar.bz2 |
R600: Add scalar i32 add test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/R600/add.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/R600/add.ll b/test/CodeGen/R600/add.ll index 8e18650..d0ff192 100644 --- a/test/CodeGen/R600/add.ll +++ b/test/CodeGen/R600/add.ll @@ -1,6 +1,22 @@ ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG-CHECK %s ; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-CHECK %s +;EG-CHECK-LABEL: @test1: +;EG-CHECK: ADD_INT {{[* ]*}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} + +;SI-CHECK-LABEL: @test1: +;SI-CHECK: V_ADD_I32_e32 [[REG:VGPR[0-9]+]], {{VGPR[0-9]+, VGPR[0-9]+}} +;SI-CHECK-NOT: [[REG]] +;SI-CHECK: BUFFER_STORE_DWORD [[REG]], +define void @test1(i32 addrspace(1)* %out, i32 addrspace(1)* %in) { + %b_ptr = getelementptr i32 addrspace(1)* %in, i32 1 + %a = load i32 addrspace(1)* %in + %b = load i32 addrspace(1)* %b_ptr + %result = add i32 %a, %b + store i32 %result, i32 addrspace(1)* %out + ret void +} + ;EG-CHECK-LABEL: @test2: ;EG-CHECK: ADD_INT {{[* ]*}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} ;EG-CHECK: ADD_INT {{[* ]*}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} |