Fix a logic bug when copying fast-math flags.
[oota-llvm.git] / lib / IR / Instructions.cpp
index 16993f1bba545d074bce5bec4b9c24e32e975c9d..b113d51d4168fdee272c8a36411775417fdd8c14 100644 (file)
@@ -2043,7 +2043,7 @@ void BinaryOperator::copyFlags(const Value *V) {
   
   // Copy the fast-math flags.
   if (auto *FP = dyn_cast<FPMathOperator>(V))
-    setFastMathFlags(FP->getFastMathFlags());
+    copyFastMathFlags(FP->getFastMathFlags());
 }
 
 //===----------------------------------------------------------------------===//