[PATCH] D133695: [InstCombine] Optimize multiplication where both operands are negated

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 07:36:15 PDT 2022


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:1833
+  case Intrinsic::matrix_multiply: {
+    // Optimise -A * -B = A * B
+    Value *A = II->getArgOperand(0);
----------------
fhahn wrote:
> According to other comments in the file, that should just be ` -A * -B -> A * B`
The "->" suggestion was not addressed, and we're back to "Optimise" which was requested to be changed/deleted.

Also, renaming the operands "NegA" and "NegB" doesn't make things clearer. In the planned next step to this patch, one of those names will be known to be incorrect. The extra words/code are not helping things.

Other than that, I have no more comments for this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133695



More information about the llvm-commits mailing list