Skip to content

Commit 7d9f158

Browse files
committed
[InstCombine] Remove FastMathFlagGuard. NFC.
1 parent fb8014c commit 7d9f158

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,10 +2674,9 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
26742674
// copysign Mag, (copysign ?, X) --> copysign Mag, X
26752675
Value *X;
26762676
if (match(Sign, m_Intrinsic<Intrinsic::copysign>(m_Value(), m_Value(X)))) {
2677-
IRBuilder<>::FastMathFlagGuard FMFGuard(Builder);
2678-
Builder.setFastMathFlags(II->getFastMathFlags() &
2679-
cast<Instruction>(Sign)->getFastMathFlags());
2680-
Value *CopySign = Builder.CreateCopySign(Mag, X);
2677+
Value *CopySign = Builder.CreateCopySign(
2678+
Mag, X,
2679+
II->getFastMathFlags() & cast<Instruction>(Sign)->getFastMathFlags());
26812680
return replaceInstUsesWith(*II, CopySign);
26822681
}
26832682

0 commit comments

Comments
 (0)