Skip to content

Commit 16789b9

Browse files
committed
Remove redundant inclusion for 0 (NFC)
If Add Constant is 0, return true anyway.
1 parent 837b2d4 commit 16789b9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24805,15 +24805,14 @@ static bool isEquivalentMaskless(unsigned CC, unsigned width,
2480524805
case AArch64CC::GT:
2480624806
if ((AddConstant == 0) ||
2480724807
(CompConstant == MaxUInt - 1 && AddConstant < 0) ||
24808-
(AddConstant >= 0 && CompConstant < 0) ||
24809-
(AddConstant <= 0 && CompConstant <= 0 && CompConstant < AddConstant))
24808+
(AddConstant > 0 && CompConstant < 0) ||
24809+
(AddConstant < 0 && CompConstant <= 0 && CompConstant < AddConstant))
2481024810
return true;
2481124811
break;
2481224812
case AArch64CC::LT:
2481324813
case AArch64CC::GE:
24814-
if ((AddConstant == 0) ||
24815-
(AddConstant >= 0 && CompConstant <= 0) ||
24816-
(AddConstant <= 0 && CompConstant <= 0 && CompConstant <= AddConstant))
24814+
if ((AddConstant == 0) || (AddConstant > 0 && CompConstant <= 0) ||
24815+
(AddConstant < 0 && CompConstant <= 0 && CompConstant <= AddConstant))
2481724816
return true;
2481824817
break;
2481924818
case AArch64CC::HI:
@@ -24825,8 +24824,7 @@ static bool isEquivalentMaskless(unsigned CC, unsigned width,
2482524824
break;
2482624825
case AArch64CC::PL:
2482724826
case AArch64CC::MI:
24828-
if ((AddConstant == 0) ||
24829-
(AddConstant > 0 && CompConstant <= 0) ||
24827+
if ((AddConstant == 0) || (AddConstant > 0 && CompConstant <= 0) ||
2483024828
(AddConstant < 0 && CompConstant <= AddConstant))
2483124829
return true;
2483224830
break;

0 commit comments

Comments
 (0)