1 ;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG-CHECK %s 2 ;RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-CHECK %s 3 4 ;EG-CHECK-LABEL: @test 5 ;EG-CHECK-NOT: SETGE_INT 6 ;EG-CHECK: CF_END 7 8 define void @test(i32 addrspace(1)* %out, i32 addrspace(1)* %in) { 9 %b_ptr = getelementptr i32 addrspace(1)* %in, i32 1 10 %a = load i32 addrspace(1) * %in 11 %b = load i32 addrspace(1) * %b_ptr 12 %result = udiv i32 %a, %b 13 store i32 %result, i32 addrspace(1)* %out 14 ret void 15 } 16 17 ;The code generated by udiv is long and complex and may frequently change. 18 ;The goal of this test is to make sure the ISel doesn't fail when it gets 19 ;a v4i32 udiv 20 21 ;EG-CHECK-LABEL: @test2 22 ;EG-CHECK: CF_END 23 ;SI-CHECK-LABEL: @test2 24 ;SI-CHECK: S_ENDPGM 25 26 define void @test2(<2 x i32> addrspace(1)* %out, <2 x i32> addrspace(1)* %in) { 27 %b_ptr = getelementptr <2 x i32> addrspace(1)* %in, i32 1 28 %a = load <2 x i32> addrspace(1) * %in 29 %b = load <2 x i32> addrspace(1) * %b_ptr 30 %result = udiv <2 x i32> %a, %b 31 store <2 x i32> %result, <2 x i32> addrspace(1)* %out 32 ret void 33 } 34 35 ;EG-CHECK-LABEL: @test4 36 ;EG-CHECK: CF_END 37 ;SI-CHECK-LABEL: @test4 38 ;SI-CHECK: S_ENDPGM 39 40 define void @test4(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* %in) { 41 %b_ptr = getelementptr <4 x i32> addrspace(1)* %in, i32 1 42 %a = load <4 x i32> addrspace(1) * %in 43 %b = load <4 x i32> addrspace(1) * %b_ptr 44 %result = udiv <4 x i32> %a, %b 45 store <4 x i32> %result, <4 x i32> addrspace(1)* %out 46 ret void 47 } 48