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 15004f5 commit 987f524Copy full SHA for 987f524
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -2703,8 +2703,9 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
2703
Mask[InsIdx] = ExtIdx + NumElts;
2704
// Cost
2705
ExtractElementInst *Ext;
2706
- if ((Ext = dyn_cast<ExtractElementInst>(I.getOperand(0))) == nullptr)
2707
- Ext = dyn_cast<ExtractElementInst>(I.getOperand(1));
+ Ext = isa<ExtractElementInst>(I.getOperand(0))
+ ? cast<ExtractElementInst>(I.getOperand(0))
2708
+ : cast<ExtractElementInst>(I.getOperand(1));
2709
2710
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
2711
InstructionCost OldCost =
0 commit comments