File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -2783,16 +2783,15 @@ static bool ignoreSignBitOfZero(Instruction &I) {
27832783 if (!I.hasOneUse ())
27842784 return false ;
27852785 Instruction *User = I.user_back ();
2786- if (User->getOpcode () == Instruction::FPToSI ||
2787- User->getOpcode () == Instruction::FPToUI)
2788- return true ;
2789-
27902786 if (auto *FPOp = dyn_cast<FPMathOperator>(User)) {
27912787 if (FPOp->hasNoSignedZeros ())
27922788 return true ;
27932789 }
27942790
27952791 switch (User->getOpcode ()) {
2792+ case Instruction::FPToSI:
2793+ case Instruction::FPToUI:
2794+ return true ;
27962795 case Instruction::FCmp:
27972796 // fcmp treats both positive and negative zero as equal.
27982797 return true ;
@@ -2830,17 +2829,15 @@ static bool ignoreSignBitOfNaN(Instruction &I) {
28302829 if (!I.hasOneUse ())
28312830 return false ;
28322831 Instruction *User = I.user_back ();
2833-
2834- if (User->getOpcode () == Instruction::FPToSI ||
2835- User->getOpcode () == Instruction::FPToUI)
2836- return true ;
2837-
28382832 if (auto *FPOp = dyn_cast<FPMathOperator>(User)) {
28392833 if (FPOp->hasNoNaNs ())
28402834 return true ;
28412835 }
28422836
28432837 switch (User->getOpcode ()) {
2838+ case Instruction::FPToSI:
2839+ case Instruction::FPToUI:
2840+ return true ;
28442841 // Proper FP math operations ignore the sign bit of NaN.
28452842 case Instruction::FAdd:
28462843 case Instruction::FSub:
You can’t perform that action at this time.
0 commit comments