[PATCH] D133300: [InstCombine] Matrix multiplication negation optimisation

Zain Jaffal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 01:47:46 PDT 2022


zjaffal added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:1887
+      Builder.SetInsertPoint(II->getNextNode());
+      Instruction *FNegInst = cast<Instruction>(Builder.CreateFNeg(II));
+      replaceInstUsesWith(*II, FNegInst);
----------------
fhahn wrote:
> there should be no need to cast to `Instruction` here, you should be able to just use `Value`.
You need it when we call `FNegInst->setOperand()`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133300/new/

https://reviews.llvm.org/D133300



More information about the llvm-commits mailing list