[llvm] [VectorCombine] Only copy IR flags for newly created instructions (PR #193271)
Jack Huang via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 21:13:32 PDT 2026
================
@@ -1443,10 +1443,21 @@ bool VectorCombine::scalarizeOpOrCmp(Instruction &I) {
Scalar->setName(I.getName() + ".scalar");
- // All IR flags are safe to back-propagate. There is no potential for extra
- // poison to be created by the scalar instruction.
- if (auto *ScalarInst = dyn_cast<Instruction>(Scalar))
- ScalarInst->copyIRFlags(&I);
+ if (auto *ScalarInst = dyn_cast<Instruction>(Scalar)) {
+ bool IsFoldOp = false;
+ for (auto Op : ScalarOps) {
----------------
jackhong12 wrote:
The related code is removed.
https://github.com/llvm/llvm-project/pull/193271
More information about the llvm-commits
mailing list