[llvm] 11abb7f - [NFC][X86][Costmodel] Drop reduntant interleaved cost test coverage
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 15 10:30:18 PST 2022
Author: Roman Lebedev
Date: 2022-11-15T21:30:06+03:00
New Revision: 11abb7fedb55a29802a45d5017d4a9a4b14c72ea
URL: https://github.com/llvm/llvm-project/commit/11abb7fedb55a29802a45d5017d4a9a4b14c72ea
DIFF: https://github.com/llvm/llvm-project/commit/11abb7fedb55a29802a45d5017d4a9a4b14c72ea.diff
LOG: [NFC][X86][Costmodel] Drop reduntant interleaved cost test coverage
These are already covered by the more general tests i've added.
Added:
Modified:
Removed:
llvm/test/Analysis/CostModel/X86/interleave-load-i32.ll
llvm/test/Analysis/CostModel/X86/interleave-store-i32.ll
llvm/test/Analysis/CostModel/X86/interleaved-load-float.ll
################################################################################
diff --git a/llvm/test/Analysis/CostModel/X86/interleave-load-i32.ll b/llvm/test/Analysis/CostModel/X86/interleave-load-i32.ll
deleted file mode 100755
index 1ba7bb0c7c39d..0000000000000
--- a/llvm/test/Analysis/CostModel/X86/interleave-load-i32.ll
+++ /dev/null
@@ -1,85 +0,0 @@
-; REQUIRES: asserts
-; RUN: opt -passes=loop-vectorize -S -mattr=avx512f --debug-only=loop-vectorize < %s 2>&1 | FileCheck %s
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
- at A = global [10240 x i32] zeroinitializer, align 16
- at B = global [10240 x i32] zeroinitializer, align 16
-
-; Function Attrs: nounwind uwtable
-define void @load_i32_interleave4() {
-;CHECK-LABEL: load_i32_interleave4
-;CHECK: Found an estimated cost of 1 for VF 1 For instruction: %0 = load
-;CHECK: Found an estimated cost of 5 for VF 2 For instruction: %0 = load
-;CHECK: Found an estimated cost of 5 for VF 4 For instruction: %0 = load
-;CHECK: Found an estimated cost of 8 for VF 8 For instruction: %0 = load
-;CHECK: Found an estimated cost of 22 for VF 16 For instruction: %0 = load
-entry:
- br label %for.body
-
-for.cond.cleanup: ; preds = %for.body
- ret void
-
-for.body: ; preds = %entry, %for.body
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
- %arrayidx = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %indvars.iv
- %0 = load i32, i32* %arrayidx, align 16
- %1 = or i64 %indvars.iv, 1
- %arrayidx2 = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %1
- %2 = load i32, i32* %arrayidx2, align 4
- %add3 = add nsw i32 %2, %0
- %3 = or i64 %indvars.iv, 2
- %arrayidx6 = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %3
- %4 = load i32, i32* %arrayidx6, align 8
- %add7 = add nsw i32 %add3, %4
- %5 = or i64 %indvars.iv, 3
- %arrayidx10 = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %5
- %6 = load i32, i32* %arrayidx10, align 4
- %add11 = add nsw i32 %add7, %6
- %arrayidx13 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %indvars.iv
- store i32 %add11, i32* %arrayidx13, align 16
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 4
- %cmp = icmp slt i64 %indvars.iv.next, 1024
- br i1 %cmp, label %for.body, label %for.cond.cleanup
-}
-
-define void @load_i32_interleave5() {
-;CHECK-LABEL: load_i32_interleave5
-;CHECK: Found an estimated cost of 1 for VF 1 For instruction: %0 = load
-;CHECK: Found an estimated cost of 6 for VF 2 For instruction: %0 = load
-;CHECK: Found an estimated cost of 9 for VF 4 For instruction: %0 = load
-;CHECK: Found an estimated cost of 18 for VF 8 For instruction: %0 = load
-;CHECK: Found an estimated cost of 35 for VF 16 For instruction: %0 = load
-entry:
- br label %for.body
-
-for.cond.cleanup: ; preds = %for.body
- ret void
-
-for.body: ; preds = %entry, %for.body
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
- %arrayidx = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %indvars.iv
- %0 = load i32, i32* %arrayidx, align 4
- %1 = add nuw nsw i64 %indvars.iv, 1
- %arrayidx2 = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %1
- %2 = load i32, i32* %arrayidx2, align 4
- %add3 = add nsw i32 %2, %0
- %3 = add nuw nsw i64 %indvars.iv, 2
- %arrayidx6 = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %3
- %4 = load i32, i32* %arrayidx6, align 4
- %add7 = add nsw i32 %add3, %4
- %5 = add nuw nsw i64 %indvars.iv, 3
- %arrayidx10 = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %5
- %6 = load i32, i32* %arrayidx10, align 4
- %add11 = add nsw i32 %add7, %6
- %7 = add nuw nsw i64 %indvars.iv, 4
- %arrayidx14 = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %7
- %8 = load i32, i32* %arrayidx14, align 4
- %add15 = add nsw i32 %add11, %8
- %arrayidx17 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %indvars.iv
- store i32 %add15, i32* %arrayidx17, align 4
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 5
- %cmp = icmp slt i64 %indvars.iv.next, 1024
- br i1 %cmp, label %for.body, label %for.cond.cleanup
-}
diff --git a/llvm/test/Analysis/CostModel/X86/interleave-store-i32.ll b/llvm/test/Analysis/CostModel/X86/interleave-store-i32.ll
deleted file mode 100755
index 4998a0bdd8cd3..0000000000000
--- a/llvm/test/Analysis/CostModel/X86/interleave-store-i32.ll
+++ /dev/null
@@ -1,85 +0,0 @@
-; REQUIRES: asserts
-; RUN: opt -passes=loop-vectorize -S -mattr=avx512f --debug-only=loop-vectorize < %s 2>&1| FileCheck %s
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
- at A = global [10240 x i32] zeroinitializer, align 16
- at B = global [10240 x i32] zeroinitializer, align 16
-
-; Function Attrs: nounwind uwtable
-define void @store_i32_interleave4() {
-;CHECK-LABEL: store_i32_interleave4
-;CHECK: Found an estimated cost of 1 for VF 1 For instruction: store i32 %add16
-;CHECK: Found an estimated cost of 5 for VF 2 For instruction: store i32 %add16
-;CHECK: Found an estimated cost of 5 for VF 4 For instruction: store i32 %add16
-;CHECK: Found an estimated cost of 11 for VF 8 For instruction: store i32 %add16
-;CHECK: Found an estimated cost of 22 for VF 16 For instruction: store i32 %add16
-entry:
- br label %for.body
-
-for.cond.cleanup: ; preds = %for.body
- ret void
-
-for.body: ; preds = %entry, %for.body
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
- %arrayidx = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %indvars.iv
- %0 = load i32, i32* %arrayidx, align 16
- %arrayidx2 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %indvars.iv
- store i32 %0, i32* %arrayidx2, align 16
- %add = add nsw i32 %0, 1
- %1 = or i64 %indvars.iv, 1
- %arrayidx7 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %1
- store i32 %add, i32* %arrayidx7, align 4
- %add10 = add nsw i32 %0, 2
- %2 = or i64 %indvars.iv, 2
- %arrayidx13 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %2
- store i32 %add10, i32* %arrayidx13, align 8
- %add16 = add nsw i32 %0, 3
- %3 = or i64 %indvars.iv, 3
- %arrayidx19 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %3
- store i32 %add16, i32* %arrayidx19, align 4
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 4
- %cmp = icmp slt i64 %indvars.iv.next, 1024
- br i1 %cmp, label %for.body, label %for.cond.cleanup
-}
-
-define void @store_i32_interleave5() {
-;CHECK-LABEL: store_i32_interleave5
-;CHECK: Found an estimated cost of 1 for VF 1 For instruction: store i32 %add22
-;CHECK: Found an estimated cost of 7 for VF 2 For instruction: store i32 %add22
-;CHECK: Found an estimated cost of 14 for VF 4 For instruction: store i32 %add22
-;CHECK: Found an estimated cost of 21 for VF 8 For instruction: store i32 %add22
-;CHECK: Found an estimated cost of 35 for VF 16 For instruction: store i32 %add22
-entry:
- br label %for.body
-
-for.cond.cleanup: ; preds = %for.body
- ret void
-
-for.body: ; preds = %entry, %for.body
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
- %arrayidx = getelementptr inbounds [10240 x i32], [10240 x i32]* @A, i64 0, i64 %indvars.iv
- %0 = load i32, i32* %arrayidx, align 4
- %arrayidx2 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %indvars.iv
- store i32 %0, i32* %arrayidx2, align 4
- %add = add nsw i32 %0, 1
- %1 = add nuw nsw i64 %indvars.iv, 1
- %arrayidx7 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %1
- store i32 %add, i32* %arrayidx7, align 4
- %add10 = add nsw i32 %0, 2
- %2 = add nuw nsw i64 %indvars.iv, 2
- %arrayidx13 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %2
- store i32 %add10, i32* %arrayidx13, align 4
- %add16 = add nsw i32 %0, 3
- %3 = add nuw nsw i64 %indvars.iv, 3
- %arrayidx19 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %3
- store i32 %add16, i32* %arrayidx19, align 4
- %add22 = add nsw i32 %0, 4
- %4 = add nuw nsw i64 %indvars.iv, 4
- %arrayidx25 = getelementptr inbounds [10240 x i32], [10240 x i32]* @B, i64 0, i64 %4
- store i32 %add22, i32* %arrayidx25, align 4
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 5
- %cmp = icmp slt i64 %indvars.iv.next, 1024
- br i1 %cmp, label %for.body, label %for.cond.cleanup
-}
diff --git a/llvm/test/Analysis/CostModel/X86/interleaved-load-float.ll b/llvm/test/Analysis/CostModel/X86/interleaved-load-float.ll
deleted file mode 100644
index aae6bf98551f5..0000000000000
--- a/llvm/test/Analysis/CostModel/X86/interleaved-load-float.ll
+++ /dev/null
@@ -1,95 +0,0 @@
-; REQUIRES: asserts
-; RUN: opt -S -passes=loop-vectorize -debug-only=loop-vectorize -mcpu=skylake %s 2>&1 | FileCheck %s
-target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
-target triple = "i386-unknown-linux-gnu"
-
- at src = common local_unnamed_addr global [120 x float] zeroinitializer, align 4
- at dst = common local_unnamed_addr global [120 x float] zeroinitializer, align 4
-
-; Function Attrs: norecurse nounwind
-define void @stride8(float %k, i32 %width_) {
-entry:
-
-; CHECK: Found an estimated cost of 48 for VF 8 For instruction: %0 = load float
-
- %cmp72 = icmp sgt i32 %width_, 0
- br i1 %cmp72, label %for.body.lr.ph, label %for.cond.cleanup
-
-for.body.lr.ph: ; preds = %entry
- br label %for.body
-
-for.cond.cleanup.loopexit: ; preds = %for.body
- br label %for.cond.cleanup
-
-for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry
- ret void
-
-for.body: ; preds = %for.body.lr.ph, %for.body
- %i.073 = phi i32 [ 0, %for.body.lr.ph ], [ %add46, %for.body ]
- %arrayidx = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %i.073
- %0 = load float, float* %arrayidx, align 4
- %mul = fmul fast float %0, %k
- %arrayidx2 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %i.073
- %1 = load float, float* %arrayidx2, align 4
- %add3 = fadd fast float %1, %mul
- store float %add3, float* %arrayidx2, align 4
- %add4 = or i32 %i.073, 1
- %arrayidx5 = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %add4
- %2 = load float, float* %arrayidx5, align 4
- %mul6 = fmul fast float %2, %k
- %arrayidx8 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %add4
- %3 = load float, float* %arrayidx8, align 4
- %add9 = fadd fast float %3, %mul6
- store float %add9, float* %arrayidx8, align 4
- %add10 = or i32 %i.073, 2
- %arrayidx11 = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %add10
- %4 = load float, float* %arrayidx11, align 4
- %mul12 = fmul fast float %4, %k
- %arrayidx14 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %add10
- %5 = load float, float* %arrayidx14, align 4
- %add15 = fadd fast float %5, %mul12
- store float %add15, float* %arrayidx14, align 4
- %add16 = or i32 %i.073, 3
- %arrayidx17 = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %add16
- %6 = load float, float* %arrayidx17, align 4
- %mul18 = fmul fast float %6, %k
- %arrayidx20 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %add16
- %7 = load float, float* %arrayidx20, align 4
- %add21 = fadd fast float %7, %mul18
- store float %add21, float* %arrayidx20, align 4
- %add22 = or i32 %i.073, 4
- %arrayidx23 = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %add22
- %8 = load float, float* %arrayidx23, align 4
- %mul24 = fmul fast float %8, %k
- %arrayidx26 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %add22
- %9 = load float, float* %arrayidx26, align 4
- %add27 = fadd fast float %9, %mul24
- store float %add27, float* %arrayidx26, align 4
- %add28 = or i32 %i.073, 5
- %arrayidx29 = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %add28
- %10 = load float, float* %arrayidx29, align 4
- %mul30 = fmul fast float %10, %k
- %arrayidx32 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %add28
- %11 = load float, float* %arrayidx32, align 4
- %add33 = fadd fast float %11, %mul30
- store float %add33, float* %arrayidx32, align 4
- %add34 = or i32 %i.073, 6
- %arrayidx35 = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %add34
- %12 = load float, float* %arrayidx35, align 4
- %mul36 = fmul fast float %12, %k
- %arrayidx38 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %add34
- %13 = load float, float* %arrayidx38, align 4
- %add39 = fadd fast float %13, %mul36
- store float %add39, float* %arrayidx38, align 4
- %add40 = or i32 %i.073, 7
- %arrayidx41 = getelementptr inbounds [120 x float], [120 x float]* @src, i32 0, i32 %add40
- %14 = load float, float* %arrayidx41, align 4
- %mul42 = fmul fast float %14, %k
- %arrayidx44 = getelementptr inbounds [120 x float], [120 x float]* @dst, i32 0, i32 %add40
- %15 = load float, float* %arrayidx44, align 4
- %add45 = fadd fast float %15, %mul42
- store float %add45, float* %arrayidx44, align 4
- %add46 = add nuw nsw i32 %i.073, 8
- %cmp = icmp slt i32 %add46, %width_
- br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit
-}
More information about the llvm-commits
mailing list