Skip to content

Commit cbb6260

Browse files
committed
simplify fmf intersect
1 parent b8ec205 commit cbb6260

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -1470,9 +1470,8 @@ Value *InstCombinerImpl::foldLogicOfFCmps(FCmpInst *LHS, FCmpInst *RHS,
14701470
// (fcmp ord x, 0.0) & (fcmp ord y, 0.0) -> (fcmp ord x, y)
14711471
// (fcmp uno x, 0.0) | (fcmp uno y, 0.0) -> (fcmp uno x, y)
14721472
IRBuilder<>::FastMathFlagGuard FMFG(Builder);
1473-
FastMathFlags FMF = LHS->getFastMathFlags();
1474-
FMF &= RHS->getFastMathFlags();
1475-
Builder.setFastMathFlags(FMF);
1473+
Builder.setFastMathFlags(LHS->getFastMathFlags() &
1474+
RHS->getFastMathFlags());
14761475
return Builder.CreateFCmp(PredL, LHS0, RHS0);
14771476
}
14781477
}

0 commit comments

Comments
 (0)