[PATCH] D48485: [InstCombine] allow shl+mul combos with shuffle (select) fold (PR37806)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 27 05:26:25 PDT 2018


lebedev.ri removed a reviewer: spatel.
lebedev.ri added a comment.

Is this waiting for a review, or are there changes planned?

The logic here seems sound.



================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1202-1203
 
-  BinaryOperator::BinaryOps Opc = B0->getOpcode();
-  Instruction *NewBO = ConstantsAreOp1 ? BinaryOperator::Create(Opc, X, NewC) :
-                                         BinaryOperator::Create(Opc, NewC, X);
+  Instruction *NewBO = ConstantsAreOp1 ? BinaryOperator::Create(Opc0, X, NewC) :
+                                         BinaryOperator::Create(Opc0, NewC, X);
 
----------------
This is going to be confusing later on, given that we already have `Opc0` and `Opc1`.



https://reviews.llvm.org/D48485





More information about the llvm-commits mailing list