[PATCH] D48485: [InstCombine] allow shl+mul combos with shuffle (select) fold (PR37806)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 22 07:39:44 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1177
+ // each vector element to determine if it is safe to keep that flag.
+ if (Opc0 == Instruction::Mul && Opc1 == Instruction::Shl) {
+ C1 = ConstantExpr::getShl(ConstantInt::get(C1->getType(), 1), C1);
----------------
Is this going to scale well? There's likely to be a lot of 'similar' cases (ADD x,x -> SHL x,1 etc.)
https://reviews.llvm.org/D48485
More information about the llvm-commits
mailing list