[PATCH] D147330: [Matrix] Refine cost estimate for dot-product.
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 09:51:22 PDT 2023
thegameg accepted this revision.
thegameg added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp:1345
+ // the returned cost is < 0, the argument is cheaper to use in the
+ // dot-product lowering. An invalid cost is return if the operand is not
+ // supported by the lowering code.
----------------
================
Comment at: llvm/test/Transforms/LowerMatrixIntrinsics/dot-product-int.ll:326
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[TMP0:%.*]] = mul <8 x i64> [[A:%.*]], [[B:%.*]]
-; CHECK-NEXT: [[TMP1:%.*]] = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> [[TMP0]])
-; CHECK-NEXT: [[TMP2:%.*]] = insertelement <1 x i64> poison, i64 [[TMP1]], i64 0
-; CHECK-NEXT: ret <1 x i64> [[TMP2]]
+; CHECK-NEXT: [[SPLIT:%.*]] = shufflevector <8 x i64> [[A:%.*]], <8 x i64> poison, <1 x i32> zeroinitializer
+; CHECK-NEXT: [[SPLIT1:%.*]] = shufflevector <8 x i64> [[A]], <8 x i64> poison, <1 x i32> <i32 1>
----------------
Wonder which part made this go back, the cost of the mul maybe?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147330/new/
https://reviews.llvm.org/D147330
More information about the llvm-commits
mailing list