From b19b474de95112f7e0fc15ab87ad284889d19cd9 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 11 Oct 2013 21:03:41 +0000 Subject: R600: Add scalar i32 add test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192501 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/R600/add.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/CodeGen') 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]}} -- cgit v1.1