[llvm] [SystemZ] SLP reductions: cost functions of reductions and scalarization (PR #112491)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 09:53:06 PDT 2024
================
@@ -104,13 +108,20 @@ declare double @llvm.fmuladd.f64(double, double, double)
; which is recognized in SystemZTTImpl::getScalarizationOverhead().
define void @fun2(ptr %0, ptr %Dst) {
; CHECK-LABEL: define void @fun2(
-; CHECK: insertelement
-; CHECK: store <2 x i64>
+; CHECK-SAME: ptr [[TMP0:%.*]], ptr [[DST:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[TMP2:%.*]] = load i64, ptr [[TMP0]], align 8
+; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i64 [[TMP2]], 0
+; CHECK-NEXT: br i1 [[TMP3]], label %[[BB4:.*]], label %[[BB5:.*]]
+; CHECK: [[BB4]]:
+; CHECK-NEXT: ret void
+; CHECK: [[BB5]]:
+; CHECK-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr [[DST]], i64 24
+; CHECK-NEXT: store i64 [[TMP2]], ptr [[TMP6]], align 8
+; CHECK-NEXT: [[TMP7:%.*]] = getelementptr i8, ptr [[DST]], i64 16
+; CHECK-NEXT: store i64 0, ptr [[TMP7]], align 8
+; CHECK-NEXT: br label %[[BB4]]
;
-; REMARK-LABEL: Function: fun2
-; REMARK: Args:
-; REMARK-NEXT: - String: 'Stores SLP vectorized with cost '
-; REMARK-NEXT: - Cost: '-1'
+; REMARK-NOT: Function: fun2
----------------
alexey-bataev wrote:
Better to copy here the actual cost rather than use -NOT syntax
https://github.com/llvm/llvm-project/pull/112491
More information about the llvm-commits
mailing list