[llvm] r346235 - [InstCombine] reduce code; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 07:53:58 PST 2018


Author: spatel
Date: Tue Nov  6 07:53:58 2018
New Revision: 346235

URL: http://llvm.org/viewvc/llvm-project?rev=346235&view=rev
Log:
[InstCombine] reduce code; NFC

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=346235&r1=346234&r2=346235&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Tue Nov  6 07:53:58 2018
@@ -5284,7 +5284,7 @@ static Instruction *foldFCmpReciprocalAn
   // Finally emit the new fcmp.
   Value *X = LHSI->getOperand(1);
   FCmpInst *NewFCI = new FCmpInst(Pred, X, RHSC);
-  NewFCI->setFastMathFlags(I.getFastMathFlags());
+  NewFCI->copyFastMathFlags(&I);
   return NewFCI;
 }
 




More information about the llvm-commits mailing list