[llvm] [Matrix] Don't update Changed based on Visit* return value (NFC). (PR #142417)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 11:58:53 PDT 2025
================
@@ -1062,13 +1062,16 @@ class LowerMatrixIntrinsics {
Value *Op1;
Value *Op2;
if (auto *BinOp = dyn_cast<BinaryOperator>(Inst))
- Changed |= VisitBinaryOperator(BinOp);
+ VisitBinaryOperator(BinOp);
if (auto *UnOp = dyn_cast<UnaryOperator>(Inst))
- Changed |= VisitUnaryOperator(UnOp);
+ VisitUnaryOperator(UnOp);
if (match(Inst, m_Load(m_Value(Op1))))
- Changed |= VisitLoad(cast<LoadInst>(Inst), Op1, Builder);
+ VisitLoad(cast<LoadInst>(Inst), Op1, Builder);
else if (match(Inst, m_Store(m_Value(Op1), m_Value(Op2))))
- Changed |= VisitStore(cast<StoreInst>(Inst), Op1, Op2, Builder);
+ VisitStore(cast<StoreInst>(Inst), Op1, Op2, Builder);
+ else
+ continue;
+ Changed = true;
----------------
jroelofs wrote:
I don't think the `Changed` logic is still correct, unless you make it a single if/else chain. With the current setup, binops will hit the `continue` path.
https://github.com/llvm/llvm-project/pull/142417
More information about the llvm-commits
mailing list