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 8522d21 commit 401ffa6Copy full SHA for 401ffa6
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2286,13 +2286,9 @@ Instruction *InstCombinerImpl::foldVectorBinop(BinaryOperator &Inst) {
2286
2287
Value *NewLHS = ConstOp1 ? V1 : NewC;
2288
Value *NewRHS = ConstOp1 ? NewC : V1;
2289
- Value *XY = Builder.CreateBinOp(Opcode, NewLHS, NewRHS);
2290
- if (auto *BO = dyn_cast<BinaryOperator>(XY))
2291
- BO->copyIRFlags(&Inst);
2292
-
2293
VectorType *VTy = cast<VectorType>(Inst.getType());
2294
- SmallVector<int> NewM(VTy->getElementCount().getKnownMinValue(), 0);
2295
- return new ShuffleVectorInst(XY, NewM);
+ SmallVector<int> Mask(VTy->getElementCount().getKnownMinValue(), 0);
+ return createBinOpShuffle(NewLHS, NewRHS, Mask);
2296
}
2297
2298
0 commit comments