brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 3706eb5 Raw
57 lines · plain
1; RUN: llc -O0 -mtriple=amdgcn < %s | FileCheck -enable-var-scope -check-prefix=GCNNOOPT -check-prefix=GCN %s2; RUN: llc -O0 -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global < %s | FileCheck -enable-var-scope  -check-prefix=GCNNOOPT -check-prefix=GCN %s3; RUN: llc -O0 -mtriple=amdgcn -mcpu=gfx1010 -mattr=-flat-for-global,+wavefrontsize64 < %s | FileCheck -enable-var-scope -check-prefix=GCNNOOPT -check-prefix=GCN %s4; RUN: llc -O0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=-flat-for-global,+wavefrontsize64 < %s | FileCheck -enable-var-scope -check-prefix=GCNNOOPT -check-prefix=GCN %s5; RUN: llc -mtriple=amdgcn < %s | FileCheck -enable-var-scope -check-prefix=GCNOPT -check-prefix=GCN %s6; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global < %s | FileCheck -enable-var-scope -check-prefix=GCNOPT -check-prefix=GCN %s7 8; GCN-LABEL: {{^}}test_branch:9; GCNNOOPT: v_writelane_b3210; GCNNOOPT: v_writelane_b3211; GCN: s_cbranch_scc1 [[END:.LBB[0-9]+_[0-9]+]]12 13; GCNNOOPT: v_readlane_b3214; GCNNOOPT: v_readlane_b3215; GCN: buffer_store_{{dword|b32}}16; GCNNOOPT: s_endpgm17 18; GCN: {{^}}[[END]]:19; GCN: s_endpgm20define amdgpu_kernel void @test_branch(ptr addrspace(1) noalias %out, ptr addrspace(1) noalias %in, i32 %val) #0 {21  %cmp = icmp ne i32 %val, 022  br i1 %cmp, label %store, label %end23 24store:25  store i32 222, ptr addrspace(1) %out26  ret void27 28end:29  ret void30}31 32; GCN-LABEL: {{^}}test_brcc_i1:33; GCN: s_load_{{dword|b32}} [[VAL:s[0-9]+]]34; GCNNOOPT: s_mov_b32 [[ONE:s[0-9]+]], 1{{$}}35; GCNNOOPT: s_and_b32 s{{[0-9]+}}, [[VAL]], [[ONE]]36; GCNOPT:   s_bitcmp0_b32 [[VAL]], 037; GCNNOOPT: s_cmp_eq_u3238; GCN: s_cbranch_scc1 [[END:.LBB[0-9]+_[0-9]+]]39 40; GCN: buffer_store_{{dword|b32}}41 42; GCN: {{^}}[[END]]:43; GCN: s_endpgm44define amdgpu_kernel void @test_brcc_i1(ptr addrspace(1) noalias %out, ptr addrspace(1) noalias %in, i1 %val) #0 {45  %cmp0 = icmp ne i1 %val, 046  br i1 %cmp0, label %store, label %end47 48store:49  store i32 222, ptr addrspace(1) %out50  ret void51 52end:53  ret void54}55 56attributes #0 = { nounwind }57