1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn -mcpu=gfx908 < %s | FileCheck %s
4 define void @wombat(i1 %cond, ptr addrspace(5) %addr) {
6 ; CHECK: ; %bb.0: ; %entry
7 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen
9 ; CHECK-NEXT: v_and_b32_e32 v0, 1, v0
10 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
11 ; CHECK-NEXT: s_and_saveexec_b64 s[4:5], vcc
12 ; CHECK-NEXT: s_cbranch_execz .LBB0_2
13 ; CHECK-NEXT: ; %bb.1: ; %then
14 ; CHECK-NEXT: s_waitcnt vmcnt(0)
15 ; CHECK-NEXT: v_mov_b32_e32 v2, 0
16 ; CHECK-NEXT: .LBB0_2: ; %end
17 ; CHECK-NEXT: s_or_b64 exec, exec, s[4:5]
18 ; CHECK-NEXT: s_waitcnt vmcnt(0)
19 ; CHECK-NEXT: buffer_store_byte v2, v1, s[0:3], 0 offen
20 ; CHECK-NEXT: s_waitcnt vmcnt(0)
21 ; CHECK-NEXT: s_setpc_b64 s[30:31]
23 %load = load <1 x i8>, ptr addrspace(5) %addr, align 1
24 br i1 %cond, label %then, label %end
30 %phi_value = phi <1 x i8> [%load, %entry], [zeroinitializer, %then]
31 store <1 x i8> %phi_value, ptr addrspace(5) %addr, align 1