We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60c4bb1 commit f9d0f2fCopy full SHA for f9d0f2f
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -2702,10 +2702,8 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
2702
std::iota(Mask.begin(), Mask.end(), 0);
2703
Mask[InsIdx] = ExtIdx + NumElts;
2704
// Cost
2705
- ExtractElementInst *Ext;
2706
- Ext = isa<ExtractElementInst>(I.getOperand(0))
2707
- ? cast<ExtractElementInst>(I.getOperand(0))
2708
- : cast<ExtractElementInst>(I.getOperand(1));
+ auto *Ins = cast<InsertElementInst>(&I);
+ auto *Ext = cast<ExtractElementInst>(I.getOperand(1));
2709
2710
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
2711
InstructionCost OldCost =
0 commit comments