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 04af5c4 commit 191345eCopy full SHA for 191345e
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -2804,10 +2804,8 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
2804
std::iota(Mask.begin(), Mask.end(), 0);
2805
Mask[InsIdx] = ExtIdx + NumElts;
2806
// Cost
2807
- ExtractElementInst *Ext;
2808
- Ext = isa<ExtractElementInst>(I.getOperand(0))
2809
- ? cast<ExtractElementInst>(I.getOperand(0))
2810
- : cast<ExtractElementInst>(I.getOperand(1));
+ auto *Ins = cast<InsertElementInst>(&I);
+ auto *Ext = cast<ExtractElementInst>(I.getOperand(1));
2811
2812
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
2813
InstructionCost OldCost =
0 commit comments