Skip to content

Commit 28cef73

Browse files
committed
Remove unsigned check
1 parent c8bb79a commit 28cef73

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,26 +2959,6 @@ static bool isX86CCSigned(X86::CondCode X86CC) {
29592959
}
29602960
}
29612961

2962-
/// Return true if the condition is an unsigned comparison operation.
2963-
static bool isX86CCUnsigned(X86::CondCode X86CC) {
2964-
switch (X86CC) {
2965-
case X86::COND_B:
2966-
case X86::COND_A:
2967-
case X86::COND_BE:
2968-
case X86::COND_AE:
2969-
return true;
2970-
default:
2971-
llvm_unreachable("Invalid integer condition!");
2972-
case X86::COND_E:
2973-
case X86::COND_NE:
2974-
case X86::COND_G:
2975-
case X86::COND_GE:
2976-
case X86::COND_L:
2977-
case X86::COND_LE:
2978-
return false;
2979-
}
2980-
}
2981-
29822962
static X86::CondCode TranslateIntegerX86CC(ISD::CondCode SetCCOpcode) {
29832963
switch (SetCCOpcode) {
29842964
// clang-format off
@@ -23508,9 +23488,9 @@ static SDValue EmitCmp(SDValue Op0, SDValue Op1, X86::CondCode X86CC,
2350823488
Op1 = DAG.getNode(ISD::TRUNCATE, dl, CmpVT, Op1);
2350923489
}
2351023490

23511-
// Try to shrink signed i64 compares if the inputs are representable as signed
23491+
// Try to shrink all i64 compares if the inputs are representable as signed
2351223492
// i32.
23513-
if (CmpVT == MVT::i64 && !isX86CCUnsigned(X86CC) &&
23493+
if (CmpVT == MVT::i64 &&
2351423494
Op0.hasOneUse() && // Hacky way to not break CSE opportunities with sub.
2351523495
DAG.ComputeNumSignBits(Op1) > 32 && DAG.ComputeNumSignBits(Op0) > 32) {
2351623496
CmpVT = MVT::i32;

0 commit comments

Comments
 (0)