brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · bd9aa0f Raw
39 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=gfx803 < %s | FileCheck -enable-var-scope -check-prefix=GCN %s2; RUN: llc -mtriple=amdgcn -mcpu=gfx803 -filetype=obj < %s | llvm-objdump --triple=amdgcn--amdhsa --mcpu=gfx803 -d - | FileCheck -check-prefix=DISASSEMBLY-VI %s3 4; Make sure we can encode and don't fail on functions which have5; instructions not actually supported by the subtarget.6; FIXME: This will still fail for gfx6/7 and gfx10 subtargets.7 8; DISASSEMBLY-VI: .long 0xdd348000                                           // {{[0-9A-Z]+}}: DD3480009; DISASSEMBLY-VI-NEXT: v_cndmask_b32_e32 v1, v0, v0, vcc                     // {{[0-9A-Z]+}}: 0002010010 11define amdgpu_kernel void @global_atomic_fadd_noret_f32_wrong_subtarget(ptr addrspace(1) %ptr) #0 {12; GCN-LABEL: global_atomic_fadd_noret_f32_wrong_subtarget:13; GCN:       ; %bb.0:14; GCN-NEXT:    s_mov_b64 s[0:1], exec15; GCN-NEXT:    v_mbcnt_lo_u32_b32 v0, s0, 016; GCN-NEXT:    v_mbcnt_hi_u32_b32 v0, s1, v017; GCN-NEXT:    v_cmp_eq_u32_e32 vcc, 0, v018; GCN-NEXT:    s_and_saveexec_b64 s[2:3], vcc19; GCN-NEXT:    s_cbranch_execz .LBB0_220; GCN-NEXT:  ; %bb.1:21; GCN-NEXT:    s_load_dwordx2 s[2:3], s[4:5], 0x2422; GCN-NEXT:    s_bcnt1_i32_b64 s0, s[0:1]23; GCN-NEXT:    v_cvt_f32_ubyte0_e32 v1, s024; GCN-NEXT:    v_mov_b32_e32 v0, 025; GCN-NEXT:    v_mul_f32_e32 v1, 4.0, v126; GCN-NEXT:    s_waitcnt lgkmcnt(0)27; GCN-NEXT:    global_atomic_add_f32 v0, v1, s[2:3]28; GCN-NEXT:    s_waitcnt vmcnt(0)29; GCN-NEXT:    buffer_wbinvl1_vol30; GCN-NEXT:  .LBB0_2:31; GCN-NEXT:    s_endpgm32  %result = atomicrmw fadd ptr addrspace(1) %ptr, float 4.0 syncscope("agent") seq_cst, !amdgpu.no.fine.grained.memory !0, !amdgpu.ignore.denormal.mode !033  ret void34}35 36attributes #0 = { "denormal-fp-math-f32"="preserve-sign,preserve-sign" "target-features"="+atomic-fadd-no-rtn-insts" }37 38!0 = !{}39