[PATCH] D37019: Add select simplifications

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 16:03:42 PDT 2017


qcolombet added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:734
+      if (Value *V = SimplifyBinOp(Opcode, A1, A2, SQ.getWithInstruction(&I)))
+        SI = Builder.CreateSelect(C1, V, Builder.CreateBinOp(Opcode, B1, B2));
+
----------------
qcolombet wrote:
> When SI != nullptr, shouldn't we use SI  instead of CreateBinOp for B1, B2, here?
I meant the previous V (the one we got from the call of SimplifyBinOp B1 B2).
(Gosh I need more coffee!)


https://reviews.llvm.org/D37019





More information about the llvm-commits mailing list