mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Folding or(fcmp,fcmp) only works if the operands of the fcmps are the same fp type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47750 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4287,7 +4287,8 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
|
||||
if (FCmpInst *LHS = dyn_cast<FCmpInst>(I.getOperand(0))) {
|
||||
if (FCmpInst *RHS = dyn_cast<FCmpInst>(I.getOperand(1))) {
|
||||
if (LHS->getPredicate() == FCmpInst::FCMP_UNO &&
|
||||
RHS->getPredicate() == FCmpInst::FCMP_UNO)
|
||||
RHS->getPredicate() == FCmpInst::FCMP_UNO &&
|
||||
LHS->getOperand(0)->getType() == RHS->getOperand(0)->getType())
|
||||
if (ConstantFP *LHSC = dyn_cast<ConstantFP>(LHS->getOperand(1)))
|
||||
if (ConstantFP *RHSC = dyn_cast<ConstantFP>(RHS->getOperand(1))) {
|
||||
// If either of the constants are nans, then the whole thing returns
|
||||
|
Reference in New Issue
Block a user