[PATCH] D52548: Stop instcombining propagating wider shufflevector arguments to predecessors.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 28 06:44:17 PDT 2018
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:900-902
+ case Instruction::FMul:
+ case Instruction::FDiv:
case Instruction::FRem:
----------------
Leave formatting changes out of this patch, so we're not distracting from the real diff.
================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:922
for (Value *Operand : I->operands()) {
- if (!CanEvaluateShuffled(Operand, Mask, Depth-1))
+ if (!CanEvaluateShuffled(Operand, Mask, Depth - 1))
return false;
----------------
Leave formatting changes out of this patch, so we're not distracting from the real diff.
================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:942
}
- return CanEvaluateShuffled(I->getOperand(0), Mask, Depth-1);
+ return CanEvaluateShuffled(I->getOperand(0), Mask, Depth - 1);
}
----------------
Leave formatting changes out of this patch, so we're not distracting from the real diff.
================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1468
+ if (isa<UndefValue>(RHS) && CanEvaluateShuffled(LHS, Mask) &&
+ !SVI.increasesLength()) {
Value *V = EvaluateInDifferentElementOrder(LHS, Mask);
----------------
The length check should be before CanEvaluateShuffled() to be more efficient (CanEval... is recursive and potentially costly).
Repository:
rL LLVM
https://reviews.llvm.org/D52548
More information about the llvm-commits
mailing list