28 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=verde < %s | FileCheck %s2; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck %s3 4; This used to raise an assertion due to how the choice between uniform and5; non-uniform branches was determined.6;7; CHECK-LABEL: {{^}}main:8; CHECK: s_cbranch_vccnz9define amdgpu_ps float @main(ptr addrspace(8) inreg %rsrc) {10main_body:11 %v = call float @llvm.amdgcn.raw.ptr.buffer.load.f32(ptr addrspace(8) %rsrc, i32 0, i32 0, i32 1)12 %cc = fcmp une float %v, 1.000000e+0013 br i1 %cc, label %if, label %else14 15if:16 %u = fadd float %v, %v17 call void asm sideeffect "", ""() #0 ; Prevent ifconversion18 br label %else19 20else:21 %r = phi float [ %v, %main_body ], [ %u, %if ]22 ret float %r23}24 25declare float @llvm.amdgcn.raw.ptr.buffer.load.f32(ptr addrspace(8), i32, i32, i32 immarg) #026 27attributes #0 = { nounwind memory(argmem: read) }28