mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Mark i64 SETCC as expand so it is turned into a SELECT_CC.
llvm-svn: 182227
This commit is contained in:
parent
1e23dfa473
commit
f777e6d131
@ -1300,6 +1300,8 @@ SparcTargetLowering::SparcTargetLowering(TargetMachine &TM)
|
||||
setOperationAction(ISD::SELECT_CC, MVT::f64, Custom);
|
||||
|
||||
if (Subtarget->is64Bit()) {
|
||||
setOperationAction(ISD::SELECT, MVT::i64, Expand);
|
||||
setOperationAction(ISD::SETCC, MVT::i64, Expand);
|
||||
setOperationAction(ISD::BR_CC, MVT::i64, Custom);
|
||||
setOperationAction(ISD::SELECT_CC, MVT::i64, Custom);
|
||||
}
|
||||
|
@ -191,3 +191,13 @@ entry:
|
||||
}
|
||||
|
||||
declare void @g(i8*)
|
||||
|
||||
; CHECK: expand_setcc
|
||||
; CHECK: subcc %i0, 1,
|
||||
; CHECK: movl %xcc, 1,
|
||||
define i32 @expand_setcc(i64 %a) {
|
||||
%cond = icmp sle i64 %a, 0
|
||||
%cast2 = zext i1 %cond to i32
|
||||
%RV = sub i32 1, %cast2
|
||||
ret i32 %RV
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user