1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck -check-prefix=GCN %s
3 ; FIXME: Emitting unnecessary flat_scratch setup
5 ; GCN-LABEL: {{^}}test_call_undef:
6 ; GCN: s_mov_b32 s8, s7
7 ; GCN: s_mov_b32 flat_scratch_lo, s5
8 ; GCN: s_add_u32 s4, s4, s8
11 define amdgpu_kernel void @test_call_undef() #0 {
12 %val = call i32 undef(i32 1)
14 store volatile i32 %op, i32 addrspace(1)* undef
18 ; GCN-LABEL: {{^}}test_tail_call_undef:
20 ; GCN-NEXT: .Lfunc_end
21 define i32 @test_tail_call_undef() #0 {
22 %call = tail call i32 undef(i32 1)
26 ; GCN-LABEL: {{^}}test_call_null:
27 ; GCN: s_mov_b32 s8, s7
28 ; GCN: s_mov_b32 flat_scratch_lo, s5
29 ; GCN: s_add_u32 s4, s4, s8
32 define amdgpu_kernel void @test_call_null() #0 {
33 %val = call i32 null(i32 1)
35 store volatile i32 %op, i32 addrspace(1)* null
39 ; GCN-LABEL: {{^}}test_tail_call_null:
41 ; GCN-NEXT: .Lfunc_end
42 define i32 @test_tail_call_null() #0 {
43 %call = tail call i32 null(i32 1)