brintos

brintos / llvm-project-archived public Read only

0
0
Text · 708 B · ec3683b Raw
27 lines · plain
1; RUN: llc < %s -mtriple=r600 -mcpu=redwood | FileCheck %s2 3; This tests a bug where LegalizeDAG was not checking the target's4; BooleanContents value and always using one for true, when expanding5; setcc to select_cc.6;7; This bug caused the icmp IR instruction to be expanded to two machine8; instructions, when only one is needed.9;10 11; CHECK: {{^}}setcc_expand:12; CHECK: SET13; CHECK-NOT: CND14define amdgpu_kernel void @setcc_expand(ptr addrspace(1) %out, i32 %in) {15entry:16  %0 = icmp eq i32 %in, 517  br i1 %0, label %IF, label %ENDIF18IF:19  %1 = getelementptr i32, ptr addrspace(1) %out, i32 120  store i32 0, ptr addrspace(1) %121  br label %ENDIF22 23ENDIF:24  store i32 0, ptr addrspace(1) %out25  ret void26}27