[PATCH] D37019: Add select simplifications

Michael Berg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 11:23:23 PDT 2017


mcberg2017 added a comment.

As  I do not yet have check-in privalges, can someone check-in this code



================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:721
   // (op (select (a, c, b)), (select (a, d, b))) -> (select (a, (op c, d), 0))
   // (op (select (a, b, c)), (select (a, b, d))) -> (select (a, 0, (op c, d)))
+  Value *A1, *B1, *C1, *A2, *B2, *C2;
----------------
qcolombet wrote:
> qcolombet wrote:
> > The comment seems weird to me.
> > Shouldn't it be:
> > (op (select (a, c, b)), (select (a, d, b))) -> (select (a, (op c, d), (op d, b)))?
> > 
> > Also I don't get why there is two of them :).
> I screwed up the variable naming but you get it! (op something something instead of 0)
I opted for this comment: 

// (op (select (a, b, c)), (select (a, d, e))) -> (select (a, (op b, d), (op c, e)))

and augmented the code to fit the comment


https://reviews.llvm.org/D37019





More information about the llvm-commits mailing list