[PATCH] D66965: [InstCombine] recognize bswap disguised as shufflevector
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 11:39:37 PDT 2019
lebedev.ri added a comment.
Looks good.
The same applies to `llvm.bitreverse.*`, i believe, if scalar type is `i1`?
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:2397-2412
+ Value *ShufOp0 = SVI->getOperand(0);
+ Value *ShufOp1 = SVI->getOperand(1);
if (SVI->hasOneUse() && DestTy->isVectorTy() &&
DestTy->getVectorNumElements() == SVI->getType()->getNumElements() &&
SVI->getType()->getNumElements() ==
- SVI->getOperand(0)->getType()->getVectorNumElements()) {
+ ShufOp0->getType()->getVectorNumElements()) {
BitCastInst *Tmp;
----------------
Precommit please
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66965/new/
https://reviews.llvm.org/D66965
More information about the llvm-commits
mailing list