brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 5a90b2f Raw
42 lines · plain
1; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa < %s | FileCheck -check-prefixes=GCN,SDAG %s2; RUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa < %s | FileCheck -check-prefixes=GCN,GISEL %s3 4; GCN-LABEL: {{^}}test_call_undef:5; GCN: s_endpgm6define amdgpu_kernel void @test_call_undef() #0 {7  %val = call i32 undef(i32 1)8  %op = add i32 %val, 19  store volatile i32 %op, ptr addrspace(1) poison10  ret void11}12 13; GCN-LABEL: {{^}}test_tail_call_undef:14; SDAG: s_waitcnt15; SDAG-NEXT: .Lfunc_end16 17; GISEL: s_setpc_b64 s{{\[[0-9]+:[0-9]+\]}}18define i32 @test_tail_call_undef() #0 {19  %call = tail call i32 undef(i32 1)20  ret i32 %call21}22 23; GCN-LABEL: {{^}}test_call_null:24; GISEL: s_swappc_b64 s{{\[[0-9]+:[0-9]+\]}}, 0{{$}}25; GCN: s_endpgm26define amdgpu_kernel void @test_call_null() #0 {27  %val = call i32 null(i32 1)28  %op = add i32 %val, 129  store volatile i32 %op, ptr addrspace(1) null30  ret void31}32 33; GCN-LABEL: {{^}}test_tail_call_null:34; SDAG: s_waitcnt35; SDAG-NEXT: .Lfunc_end36 37; GISEL: s_setpc_b64 s{{\[[0-9]+:[0-9]+\]$}}38define i32 @test_tail_call_null() #0 {39  %call = tail call i32 null(i32 1)40  ret i32 %call41}42