[PATCH] D31527: InstSimplify: A shuffle of a splat is always the splat itself
Zvi Rackover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 10:01:33 PDT 2017
zvi added inline comments.
================
Comment at: lib/Analysis/InstructionSimplify.cpp:4123
+ if (auto Op0Shuf = dyn_cast<ShuffleVectorInst>(Op0))
+ if (isa<UndefValue>(Op1) && Op0Shuf->getMask()->getSplatValue())
+ return Op0;
----------------
RKSimon wrote:
> We should only perform this if the result has the same number of elements as the source - please add a type check for RetTy == Op0->getType()
Good catch.
Repository:
rL LLVM
https://reviews.llvm.org/D31527
More information about the llvm-commits
mailing list