[PATCH] D37019: Add select simplifications

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 17:57:56 PDT 2017


craig.topper added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineAddSub.cpp:1410
+            Value *V1 = Builder.CreateFAdd(B1, B2);
+            if (Instruction *I0 = dyn_cast<Instruction>(V0))
+              I0->setFastMathFlags(I.getFastMathFlags());
----------------
I don't think this can ever be an Instruction. If you started with two Constants, at worst you'd get back a ConstantExpr here and you need to set the fast math flags on that.


https://reviews.llvm.org/D37019





More information about the llvm-commits mailing list