[PATCH] D133300: [InstCombine] Matrix multiplication negation optimisation
Zain Jaffal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 08:42:32 PDT 2022
zjaffal added a comment.
In D133300#3774699 <https://reviews.llvm.org/D133300#3774699>, @radford wrote:
> In D133300#3771911 <https://reviews.llvm.org/D133300#3771911>, @thegameg wrote:
>
>> Are we looking to also support `-(A * B) -> -A * B` with the negation on the cheapest operand? (might need to check what the required fast math flags are)
>
> We should. In particular, there three places for the negation to go: `-A * B = A * -B = -(A * B)` and any one of the three might be smaller.
Yes I am not covering this case. I can add a test case for it and then introduce another patch for it
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