[PATCH] D133287: [InstCombine] Test for matrix multiplication negation optimisation.

Zain Jaffal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 02:48:56 PDT 2022


zjaffal added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/matrix-multiplication-negation.ll:4
+
+define <2 x double> @test_negation_move_to_result(<6 x double> %a, <3 x double> %b) {
+; CHECK-LABEL: @test_negation_move_to_result(
----------------
fhahn wrote:
> could you also add versions of `test_negation_move_to_result` & `test_negation_not_moved` where the second operand is negated instead?
Okay I will add those tests now


================
Comment at: llvm/test/Transforms/InstCombine/matrix-multiplication-negation.ll:15
+
+define <9 x double> @test_move_negation_to_second_operand(<27 x double> %a, <3 x double> %b) {
+; CHECK-LABEL: @test_move_negation_to_second_operand(
----------------
fhahn wrote:
> Could also add another version of the test where the negation is moved from the second to the first operand?
I think this is a good test case as well


================
Comment at: llvm/test/Transforms/InstCombine/matrix-multiplication-negation.ll:68
+  %a.neg = fneg <27 x double> %a
+  %b.neg = fneg <3 x double> %b
+  %res = tail call <9 x double> @llvm.matrix.multiply.v9f64.v27f64.v3f64(<27 x double> %a.neg, <3 x double> %b, i32 9, i32 3, i32 1)
----------------
fhahn wrote:
> `%b.neg` isn't used?
I will add it now


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133287



More information about the llvm-commits mailing list