[PATCH] D37019: Add select simplifications

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 13:23:09 PDT 2017


majnemer added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineAddSub.cpp:1408-1409
+                   isa<Constant>(B1) && isa<Constant>(B2)) {
+            Value *V0 = Builder.CreateFAdd(A1, A2);
+            Value *V1 = Builder.CreateFAdd(B1, B2);
+            return SelectInst::Create(C, V0, V1);
----------------
Shouldn't these copy the fast math flags from the original add?


https://reviews.llvm.org/D37019





More information about the llvm-commits mailing list