1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; This tests a bug where LegalizeDAG was not checking the target's 4*9880d681SAndroid Build Coastguard Worker; BooleanContents value and always using one for true, when expanding 5*9880d681SAndroid Build Coastguard Worker; setcc to select_cc. 6*9880d681SAndroid Build Coastguard Worker; 7*9880d681SAndroid Build Coastguard Worker; This bug caused the icmp IR instruction to be expanded to two machine 8*9880d681SAndroid Build Coastguard Worker; instructions, when only one is needed. 9*9880d681SAndroid Build Coastguard Worker; 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Worker; CHECK: {{^}}setcc_expand: 12*9880d681SAndroid Build Coastguard Worker; CHECK: SET 13*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: CND 14*9880d681SAndroid Build Coastguard Workerdefine void @setcc_expand(i32 addrspace(1)* %out, i32 %in) { 15*9880d681SAndroid Build Coastguard Workerentry: 16*9880d681SAndroid Build Coastguard Worker %0 = icmp eq i32 %in, 5 17*9880d681SAndroid Build Coastguard Worker br i1 %0, label %IF, label %ENDIF 18*9880d681SAndroid Build Coastguard WorkerIF: 19*9880d681SAndroid Build Coastguard Worker %1 = getelementptr i32, i32 addrspace(1)* %out, i32 1 20*9880d681SAndroid Build Coastguard Worker store i32 0, i32 addrspace(1)* %1 21*9880d681SAndroid Build Coastguard Worker br label %ENDIF 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard WorkerENDIF: 24*9880d681SAndroid Build Coastguard Worker store i32 0, i32 addrspace(1)* %out 25*9880d681SAndroid Build Coastguard Worker ret void 26*9880d681SAndroid Build Coastguard Worker} 27