1 ; RUN: llc < %s -mtriple=r600 -mcpu=redwood | FileCheck %s
3 ; This tests a bug where LegalizeDAG was not checking the target's
4 ; BooleanContents value and always using one for true, when expanding
7 ; This bug caused the icmp IR instruction to be expanded to two machine
8 ; instructions, when only one is needed.
11 ; CHECK: {{^}}setcc_expand:
14 define amdgpu_kernel void @setcc_expand(ptr addrspace(1) %out, i32 %in) {
16 %0 = icmp eq i32 %in, 5
17 br i1 %0, label %IF, label %ENDIF
19 %1 = getelementptr i32, ptr addrspace(1) %out, i32 1
20 store i32 0, ptr addrspace(1) %1
24 store i32 0, ptr addrspace(1) %out