[PATCH] D53507: [InstCombine] try to turn shuffle into insertelement
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 07:56:07 PDT 2018
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1579
+ IndexC = ConstantInt::get(IndexC->getType(), NewInsIndex);
+ return true;
+ };
----------------
RKSimon wrote:
> Worth returning an ConstantInt*/nullptr instead? Mainly to remove the external IndexC being used for the match at the start of the lambda.
We can make this more like a souped-up 'match', so pass in both of the values that we want to capture:
auto isShufflingScalarIntoOp1 = [&](Value *&Scalar, ConstantInt *&IndexC) {
https://reviews.llvm.org/D53507
More information about the llvm-commits
mailing list