aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Analysis
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2023-12-09 21:27:42 +0000
committerFlorian Hahn <flo@fhahn.com>2023-12-09 21:27:42 +0000
commitcd4067af3645f5b3d80cf012e3ae1ead1d6a30ad (patch)
treef0fb040b87b8f67017ef5a4380ff7d49cfebb5d6 /llvm/test/Analysis
parentb5b250b6ff58acfbd7f0c70ea186b416d3b0d7d7 (diff)
downloadllvm-cd4067af3645f5b3d80cf012e3ae1ead1d6a30ad.zip
llvm-cd4067af3645f5b3d80cf012e3ae1ead1d6a30ad.tar.gz
llvm-cd4067af3645f5b3d80cf012e3ae1ead1d6a30ad.tar.bz2
[LAA] Remove duplicated test.
depend_diff_types.ll already covers the same tests afer it hs been converted to opaque pointersj, so remove the redundant depend_diff_types_opaque_ptr.ll
Diffstat (limited to 'llvm/test/Analysis')
-rw-r--r--llvm/test/Analysis/LoopAccessAnalysis/depend_diff_types_opaque_ptr.ll179
1 files changed, 0 insertions, 179 deletions
diff --git a/llvm/test/Analysis/LoopAccessAnalysis/depend_diff_types_opaque_ptr.ll b/llvm/test/Analysis/LoopAccessAnalysis/depend_diff_types_opaque_ptr.ll
deleted file mode 100644
index e424683b..0000000
--- a/llvm/test/Analysis/LoopAccessAnalysis/depend_diff_types_opaque_ptr.ll
+++ /dev/null
@@ -1,179 +0,0 @@
-; RUN: opt -S -disable-output -passes='print<access-info>' < %s 2>&1 | FileCheck %s
-
-; In the function below some of the accesses are done as float types and some
-; are done as i32 types. When doing dependence analysis the type should not
-; matter if it can be determined that they are the same size.
-
-%int_pair = type { i32, i32 }
-
-; CHECK-LABEL: function 'backdep_type_size_equivalence':
-; CHECK-NEXT: loop:
-; CHECK-NEXT: Memory dependences are safe with a maximum safe vector width of 3200 bits
-; CHECK-NEXT: Dependences:
-; CHECK-NEXT: Forward:
-; CHECK-NEXT: %ld.f32 = load float, ptr %gep.iv, align 8 ->
-; CHECK-NEXT: store i32 %indvars.iv.i32, ptr %gep.iv, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: Forward:
-; CHECK-NEXT: %ld.f32 = load float, ptr %gep.iv, align 8 ->
-; CHECK-NEXT: store float %val, ptr %gep.iv.min.100, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: BackwardVectorizable:
-; CHECK-NEXT: store float %val, ptr %gep.iv.min.100, align 8 ->
-; CHECK-NEXT: store i32 %indvars.iv.i32, ptr %gep.iv, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: Run-time memory checks:
-; CHECK-NEXT: Grouped accesses:
-
-define void @backdep_type_size_equivalence(ptr nocapture %vec, i64 %n) {
-entry:
- br label %loop
-
-loop:
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %loop ]
-
- ;; Load from vec[indvars.iv].x as float
- %gep.iv = getelementptr inbounds %int_pair, ptr %vec, i64 %indvars.iv, i32 0
- %ld.f32 = load float, ptr %gep.iv, align 8
- %val = fmul fast float %ld.f32, 5.0
-
- ;; Store to vec[indvars.iv - 100].x as float
- %indvars.iv.min.100 = add nsw i64 %indvars.iv, -100
- %gep.iv.min.100 = getelementptr inbounds %int_pair, ptr %vec, i64 %indvars.iv.min.100, i32 0
- store float %val, ptr %gep.iv.min.100, align 8
-
- ;; Store to vec[indvars.iv].x as i32, creating a backward dependency between
- ;; the two stores with different element types but the same element size.
- %indvars.iv.i32 = trunc i64 %indvars.iv to i32
- store i32 %indvars.iv.i32, ptr %gep.iv, align 8
-
- ;; Store to vec[indvars.iv].y as i32, strided accesses should be independent
- ;; between the two stores with different element types but the same element size.
- %gep.iv.1 = getelementptr inbounds %int_pair, ptr %vec, i64 %indvars.iv, i32 1
- store i32 %indvars.iv.i32, ptr %gep.iv.1, align 8
-
- ;; Store to vec[indvars.iv + n].y as i32, to verify no dependence in the case
- ;; of unknown dependence distance.
- %indvars.iv.n = add nuw nsw i64 %indvars.iv, %n
- %gep.iv.n = getelementptr inbounds %int_pair, ptr %vec, i64 %indvars.iv.n, i32 1
- store i32 %indvars.iv.i32, ptr %gep.iv.n, align 8
-
- ;; Loop condition.
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
- %cond = icmp eq i64 %indvars.iv.next, %n
- br i1 %cond, label %exit, label %loop
-
-exit:
- ret void
-}
-
-; In the function below one of the accesses is done as i19 type, which has a
-; different store size than the i32 type, even though their alloc sizes are
-; equivalent. This is a negative test to ensure that they are not analyzed as
-; in the tests above.
-;
-; CHECK-LABEL: function 'backdep_type_store_size_equivalence':
-; CHECK-NEXT: loop:
-; CHECK-NEXT: Report: unsafe dependent memory operations in loop.
-; CHECK-NEXT: Unknown data dependence.
-; CHECK-NEXT: Dependences:
-; CHECK-NEXT: Unknown:
-; CHECK-NEXT: %ld.f32 = load float, ptr %gep.iv, align 8 ->
-; CHECK-NEXT: store i19 %indvars.iv.i19, ptr %gep.iv, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: Run-time memory checks:
-; CHECK-NEXT: Grouped accesses:
-
-define void @backdep_type_store_size_equivalence(ptr nocapture %vec, i64 %n) {
-entry:
- br label %loop
-
-loop:
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %loop ]
-
- ;; Load from vec[indvars.iv].x as float
- %gep.iv = getelementptr inbounds %int_pair, ptr %vec, i64 %indvars.iv, i32 0
- %ld.f32 = load float, ptr %gep.iv, align 8
- %val = fmul fast float %ld.f32, 5.0
-
- ;; Store to vec[indvars.iv].x as i19.
- %indvars.iv.i19 = trunc i64 %indvars.iv to i19
- store i19 %indvars.iv.i19, ptr %gep.iv, align 8
-
- ;; Loop condition.
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
- %cond = icmp eq i64 %indvars.iv.next, %n
- br i1 %cond, label %exit, label %loop
-
-exit:
- ret void
-}
-
-; In the function below some of the accesses are done as double types and some
-; are done as i64 and i32 types. This is a negative test to ensure that they
-; are not analyzed as in the tests above.
-
-; CHECK-LABEL: function 'neg_dist_dep_type_size_equivalence':
-; CHECK-NEXT: loop:
-; CHECK-NEXT: Report: unsafe dependent memory operations in loop.
-; CHECK-NEXT: Unknown data dependence.
-; CHECK-NEXT: Dependences:
-; CHECK-NEXT: Unknown:
-; CHECK-NEXT: %ld.f64 = load double, ptr %gep.iv, align 8 ->
-; CHECK-NEXT: store i32 %ld.i64.i32, ptr %gep.iv.n, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: Unknown:
-; CHECK-NEXT: %ld.i64 = load i64, ptr %gep.iv, align 8 ->
-; CHECK-NEXT: store i32 %ld.i64.i32, ptr %gep.iv.n, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: BackwardVectorizableButPreventsForwarding:
-; CHECK-NEXT: %ld.f64 = load double, ptr %gep.iv, align 8 ->
-; CHECK-NEXT: store double %val, ptr %gep.iv.101, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: ForwardButPreventsForwarding:
-; CHECK-NEXT: store double %val, ptr %gep.iv.101, align 8 ->
-; CHECK-NEXT: %ld.i64 = load i64, ptr %gep.iv, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: Unknown:
-; CHECK-NEXT: store double %val, ptr %gep.iv.101, align 8 ->
-; CHECK-NEXT: store i32 %ld.i64.i32, ptr %gep.iv.n, align 8
-; CHECK-EMPTY:
-; CHECK-NEXT: Run-time memory checks:
-; CHECK-NEXT: Grouped accesses:
-
-define void @neg_dist_dep_type_size_equivalence(ptr nocapture %vec, i64 %n) {
-entry:
- br label %loop
-
-loop:
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %loop ]
-
- ;; Load from vec[indvars.iv] as double
- %gep.iv = getelementptr i64, ptr %vec, i64 %indvars.iv
- %ld.f64 = load double, ptr %gep.iv, align 8
- %val = fmul fast double %ld.f64, 5.0
-
- ;; Store to vec[indvars.iv + 101] as double
- %indvars.iv.101 = add nsw i64 %indvars.iv, 101
- %gep.iv.101 = getelementptr i64, ptr %vec, i64 %indvars.iv.101
- store double %val, ptr %gep.iv.101, align 8
-
- ;; Read from vec[indvars.iv] as i64 creating
- ;; a forward but prevents forwarding dependence
- ;; with different types but same sizes.
- %ld.i64 = load i64, ptr %gep.iv, align 8
-
- ;; Different sizes
- %indvars.iv.n = add nuw nsw i64 %indvars.iv, %n
- %gep.iv.n = getelementptr inbounds i64, ptr %vec, i64 %indvars.iv.n
- %ld.i64.i32 = trunc i64 %ld.i64 to i32
- store i32 %ld.i64.i32, ptr %gep.iv.n, align 8
-
- ;; Loop condition.
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
- %cond = icmp eq i64 %indvars.iv.next, %n
- br i1 %cond, label %exit, label %loop
-
-exit:
- ret void
-}