File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1122,10 +1122,11 @@ bool VectorCombine::scalarizeOpOrCmp(Instruction &I) {
1122
1122
else if (isa<BinaryOperator>(I))
1123
1123
NewVecC = ConstantFoldBinaryOpOperands ((Instruction::BinaryOps)Opcode,
1124
1124
VecCs[0 ], VecCs[1 ], *DL);
1125
- else if (isa<IntrinsicInst>(I) && cast<IntrinsicInst>(I).arg_size () == 2 )
1126
- NewVecC =
1127
- ConstantFoldBinaryIntrinsic (cast<IntrinsicInst>(I).getIntrinsicID (),
1128
- VecCs[0 ], VecCs[1 ], I.getType (), &I);
1125
+ else if (auto *II = dyn_cast<IntrinsicInst>(&I)) {
1126
+ if (II->arg_size () == 2 )
1127
+ NewVecC = ConstantFoldBinaryIntrinsic (II->getIntrinsicID (), VecCs[0 ],
1128
+ VecCs[1 ], II->getType (), II);
1129
+ }
1129
1130
1130
1131
// Get cost estimate for the insert element. This cost will factor into
1131
1132
// both sequences.
You can’t perform that action at this time.
0 commit comments