From 42cd38c01e5b76357e77b8c0f4f32d77a97d153f Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 8 Mar 2023 11:39:17 -0600 Subject: [Polly] Remove -polly-vectorizer=polly. Polly's internal vectorizer is not well maintained and is known to not work in some cases such as region ScopStmts. Unlike LLVM's LoopVectorize pass it also does not have a target-dependent cost heuristics, and we recommend using LoopVectorize instead of -polly-vectorizer=polly. In the future we hope that Polly can collaborate better with LoopVectorize, like Polly marking a loop is safe to vectorize with a specific simd width, instead of replicating its functionality. Reviewed By: grosser Differential Revision: https://reviews.llvm.org/D142640 --- .../test/CodeGen/20130211-getNumberOfIterations.ll | 27 --- polly/test/CodeGen/MemAccess/simple_analyze.ll | 29 --- polly/test/CodeGen/MemAccess/simple_stride_test.ll | 47 ----- polly/test/CodeGen/OpenMP/scev-rewriting.ll | 2 +- polly/test/CodeGen/getNumberOfIterations.ll | 39 ---- polly/test/CodeGen/if-conditions-in-vector-code.ll | 68 ------- .../test/CodeGen/invariant_load_hoist_alignment.ll | 31 ---- polly/test/CodeGen/partial_write_mapped_vector.ll | 57 ------ ...tial_write_mapped_vector___%for---%return.jscop | 39 ---- ...apped_vector___%for---%return.jscop.transformed | 39 ---- polly/test/CodeGen/simple_vec_assign_scalar.ll | 64 ------- polly/test/CodeGen/simple_vec_assign_scalar_2.ll | 65 ------- polly/test/CodeGen/simple_vec_call.ll | 37 ---- polly/test/CodeGen/simple_vec_call_2.ll | 37 ---- polly/test/CodeGen/simple_vec_cast.ll | 38 ---- polly/test/CodeGen/simple_vec_const.ll | 60 ------ polly/test/CodeGen/simple_vec_large_width.ll | 39 ---- polly/test/CodeGen/simple_vec_ptr_ptr_ty.ll | 31 ---- .../test/CodeGen/simple_vec_stride_negative_one.ll | 37 ---- polly/test/CodeGen/simple_vec_stride_one.ll | 37 ---- polly/test/CodeGen/simple_vec_stride_x.ll | 72 -------- polly/test/CodeGen/simple_vec_strides_multidim.ll | 76 -------- polly/test/CodeGen/simple_vec_two_stmts.ll | 49 ----- polly/test/CodeGen/stride_detection.ll | 56 ------ .../2012-04-16-Trivially-vectorizable-loops.ll | 204 --------------------- .../prevectorization-without-tiling.ll | 2 +- polly/test/ScheduleOptimizer/prevectorization.ll | 5 +- polly/test/ScheduleOptimizer/rectangular-tiling.ll | 16 -- polly/test/ScheduleOptimizer/vec-addr-space.ll | 85 --------- 29 files changed, 4 insertions(+), 1384 deletions(-) delete mode 100644 polly/test/CodeGen/20130211-getNumberOfIterations.ll delete mode 100644 polly/test/CodeGen/MemAccess/simple_stride_test.ll delete mode 100644 polly/test/CodeGen/getNumberOfIterations.ll delete mode 100644 polly/test/CodeGen/if-conditions-in-vector-code.ll delete mode 100644 polly/test/CodeGen/invariant_load_hoist_alignment.ll delete mode 100644 polly/test/CodeGen/partial_write_mapped_vector.ll delete mode 100644 polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop delete mode 100644 polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop.transformed delete mode 100644 polly/test/CodeGen/simple_vec_assign_scalar.ll delete mode 100644 polly/test/CodeGen/simple_vec_assign_scalar_2.ll delete mode 100644 polly/test/CodeGen/simple_vec_call.ll delete mode 100644 polly/test/CodeGen/simple_vec_call_2.ll delete mode 100644 polly/test/CodeGen/simple_vec_cast.ll delete mode 100644 polly/test/CodeGen/simple_vec_const.ll delete mode 100644 polly/test/CodeGen/simple_vec_large_width.ll delete mode 100644 polly/test/CodeGen/simple_vec_ptr_ptr_ty.ll delete mode 100644 polly/test/CodeGen/simple_vec_stride_negative_one.ll delete mode 100644 polly/test/CodeGen/simple_vec_stride_one.ll delete mode 100644 polly/test/CodeGen/simple_vec_stride_x.ll delete mode 100644 polly/test/CodeGen/simple_vec_strides_multidim.ll delete mode 100644 polly/test/CodeGen/simple_vec_two_stmts.ll delete mode 100644 polly/test/CodeGen/stride_detection.ll delete mode 100644 polly/test/ScheduleOptimizer/2012-04-16-Trivially-vectorizable-loops.ll delete mode 100644 polly/test/ScheduleOptimizer/vec-addr-space.ll (limited to 'polly/test') diff --git a/polly/test/CodeGen/20130211-getNumberOfIterations.ll b/polly/test/CodeGen/20130211-getNumberOfIterations.ll deleted file mode 100644 index cef0dd5..0000000 --- a/polly/test/CodeGen/20130211-getNumberOfIterations.ll +++ /dev/null @@ -1,27 +0,0 @@ -; RUN: opt %loadPolly -polly-codegen -polly-vectorizer=polly < %s - -; This test case checks that the polly vectorizer does not crash when -; calculating the number of iterations. -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" - -@b = external global [2048 x i64], align 16 - -define void @foo(i64 %n) { -entry: - br label %for.cond - -for.cond: ; preds = %for.body, %entry - %indvar = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %cmp = icmp slt i64 %indvar, %n - br i1 %cmp, label %for.body, label %for.end - -for.body: ; preds = %for.cond - %arrayidx = getelementptr inbounds [2048 x i64], ptr @b, i64 0, i64 %indvar - store i64 1, ptr %arrayidx - %inc = add nsw i64 %indvar, 1 - br label %for.cond - -for.end: ; preds = %for.cond - ret void -} - diff --git a/polly/test/CodeGen/MemAccess/simple_analyze.ll b/polly/test/CodeGen/MemAccess/simple_analyze.ll index 00c9082..143651b 100644 --- a/polly/test/CodeGen/MemAccess/simple_analyze.ll +++ b/polly/test/CodeGen/MemAccess/simple_analyze.ll @@ -1,5 +1,4 @@ ;RUN: opt %loadPolly -polly-print-import-jscop -polly-import-jscop-postfix=transformed -disable-output < %s | FileCheck %s -;RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -polly-vectorizer=polly -S < %s | FileCheck %s --check-prefix=JSCOPVEC target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32" @A = common global [100 x i32] zeroinitializer, align 4 @@ -46,31 +45,3 @@ for.end14: ; preds = %for.cond4 } ; CHECK-DAG: New access function '{ Stmt_for_body7[i0] -> MemRef_B[0] }' detected in JSCOP file ; CHECK-DAG: New access function '{ Stmt_for_body[i0] -> MemRef_A[0] }' detected in JSCOP file - -; Verify that the new access function (see above) is actually used during vector code generation. - -; JSCOPVEC: store i32 0, ptr @B -; JSCOPVEC: store i32 1, ptr @B -; JSCOPVEC: store i32 2, ptr @B -; JSCOPVEC: store i32 3, ptr @B -; JSCOPVEC: store i32 4, ptr @B -; JSCOPVEC: store i32 5, ptr @B -; JSCOPVEC: store i32 6, ptr @B -; JSCOPVEC: store i32 7, ptr @B -; JSCOPVEC: store i32 8, ptr @B -; JSCOPVEC: store i32 9, ptr @B -; JSCOPVEC: store i32 10, ptr @B -; JSCOPVEC: store i32 11, ptr @B - -; JSCOPVEC: store i32 0, ptr @A -; JSCOPVEC: store i32 1, ptr @A -; JSCOPVEC: store i32 2, ptr @A -; JSCOPVEC: store i32 3, ptr @A -; JSCOPVEC: store i32 4, ptr @A -; JSCOPVEC: store i32 5, ptr @A -; JSCOPVEC: store i32 6, ptr @A -; JSCOPVEC: store i32 7, ptr @A -; JSCOPVEC: store i32 8, ptr @A -; JSCOPVEC: store i32 9, ptr @A -; JSCOPVEC: store i32 10, ptr @A -; JSCOPVEC: store i32 11, ptr @A diff --git a/polly/test/CodeGen/MemAccess/simple_stride_test.ll b/polly/test/CodeGen/MemAccess/simple_stride_test.ll deleted file mode 100644 index 8ba72a5..0000000 --- a/polly/test/CodeGen/MemAccess/simple_stride_test.ll +++ /dev/null @@ -1,47 +0,0 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-import-jscop -polly-codegen -polly-vectorizer=polly -S < %s | FileCheck %s -; -; Check that we use the correct __new__ strides: -; stride zero for B -; stride one for A -; -; CHECK: %polly.access.B = getelementptr i32, i32* %B, i64 0 -; CHECK: %[[BC:[._a-zA-Z0-9]*]] = bitcast i32* %polly.access.B to <1 x i32>* -; CHECK: %[[LD:[._a-zA-Z0-9]*]] = load <1 x i32>, <1 x i32>* %[[BC]], align 8 -; CHECK: %[[SV:[._a-zA-Z0-9]*]] = shufflevector <1 x i32> %[[LD]], <1 x i32> %[[LD]], <16 x i32> zeroinitializer -; -; CHECK: %polly.access.A = getelementptr i32, i32* %A, i64 0 -; CHECK: %[[VP:[._a-zA-Z0-9]*]] = bitcast i32* %polly.access.A to <16 x i32>* -; CHECK: store <16 x i32> %[[SV]], <16 x i32>* %[[VP]], align 8 -; -; void simple_stride(int *restrict A, int *restrict B) { -; for (int i = 0; i < 16; i++) -; A[i * 2] = B[i * 2]; -; } -; -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" - -define void @simple_stride(i32* noalias %A, i32* noalias %B) { -entry: - br label %for.cond - -for.cond: ; preds = %for.inc, %entry - %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] - %exitcond = icmp ne i64 %indvars.iv, 16 - br i1 %exitcond, label %for.body, label %for.end - -for.body: ; preds = %for.cond - %tmp = shl nsw i64 %indvars.iv, 1 - %arrayidx = getelementptr inbounds i32, i32* %B, i64 %tmp - %tmp4 = load i32, i32* %arrayidx, align 4 - %tmp5 = shl nsw i64 %indvars.iv, 1 - %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %tmp5 - store i32 %tmp4, i32* %arrayidx3, align 4 - br label %for.inc - -for.inc: ; preds = %for.body - %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - br label %for.cond - -for.end: ; preds = %for.cond - ret void -} diff --git a/polly/test/CodeGen/OpenMP/scev-rewriting.ll b/polly/test/CodeGen/OpenMP/scev-rewriting.ll index 0f6ca90..1b229fc 100644 --- a/polly/test/CodeGen/OpenMP/scev-rewriting.ll +++ b/polly/test/CodeGen/OpenMP/scev-rewriting.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly < %s -polly-vectorizer=polly -polly-parallel -polly-parallel-force -polly-process-unprofitable -polly-codegen -S | FileCheck %s +; RUN: opt %loadPolly < %s -polly-vectorizer=stripmine -polly-parallel -polly-parallel-force -polly-process-unprofitable -polly-codegen -S | FileCheck %s ; CHECK: define internal void @DoStringSort_polly_subfn target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "aarch64-unknown-linux-gnueabi" diff --git a/polly/test/CodeGen/getNumberOfIterations.ll b/polly/test/CodeGen/getNumberOfIterations.ll deleted file mode 100644 index e59a076..0000000 --- a/polly/test/CodeGen/getNumberOfIterations.ll +++ /dev/null @@ -1,39 +0,0 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-vectorizer=polly -polly-codegen \ -; RUN: < %s -S | FileCheck %s - -; #pragma known-parallel -; for (int c0 = 0; c0 <= min(15, N - 1); c0 += 1) -; Stmt_if_then(c0); - -; CHECK: polly.stmt.if.then: ; preds = %polly.loop_header -; CHECK: %p_conv = sitofp i64 %polly.indvar to float -; CHECK: %scevgep = getelementptr float, float* %A, i64 %polly.indvar -; CHECK: %_p_scalar_ = load float, float* %scevgep, align 4, !alias.scope !0, !noalias !3, !llvm.access.group !4 -; CHECK: %p_add = fadd float %p_conv, %_p_scalar_ -; CHECK: store float %p_add, float* %scevgep, align 4, !alias.scope !0, !noalias !3, !llvm.access.group !4 - -define void @foo(float* %A, i64 %N) #0 { -entry: - br label %for.body - -for.body: ; preds = %entry, %for.inc - %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.inc ] - %cmp1 = icmp slt i64 %i.02, %N - br i1 %cmp1, label %if.then, label %for.inc - -if.then: ; preds = %for.body - %conv = sitofp i64 %i.02 to float - %arrayidx = getelementptr inbounds float, float* %A, i64 %i.02 - %0 = load float, float* %arrayidx, align 4 - %add = fadd float %conv, %0 - store float %add, float* %arrayidx, align 4 - br label %for.inc - -for.inc: ; preds = %for.body, %if.then - %inc = add nuw nsw i64 %i.02, 1 - %exitcond = icmp ne i64 %inc, 16 - br i1 %exitcond, label %for.body, label %for.end - -for.end: ; preds = %for.inc - ret void -} diff --git a/polly/test/CodeGen/if-conditions-in-vector-code.ll b/polly/test/CodeGen/if-conditions-in-vector-code.ll deleted file mode 100644 index 0b1897e..0000000 --- a/polly/test/CodeGen/if-conditions-in-vector-code.ll +++ /dev/null @@ -1,68 +0,0 @@ -; RUN: opt %loadPolly -polly-vectorizer=polly -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST -; RUN: opt %loadPolly -polly-vectorizer=polly -polly-codegen -S < %s | FileCheck %s -; -; void foo(float *A) { -; for (long i = 0; i < 16; i++) { -; if (i % 2) -; A[i] += 2; -; if (i % 3) -; A[i] += 3; -; } -; } -; -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" - -; AST: #pragma simd -; AST: #pragma known-parallel -; AST: for (int c0 = 0; c0 <= 15; c0 += 1) { -; AST: if ((c0 + 1) % 2 == 0) -; AST: Stmt_bb4(c0); -; AST: if (c0 % 3 >= 1) -; AST: Stmt_bb11(c0); -; AST: } - -; CHECK: polly.split_new_and_old - -define void @foo(ptr %A) { -bb: - br label %bb1 - -bb1: ; preds = %bb16, %bb - %i.0 = phi i64 [ 0, %bb ], [ %tmp17, %bb16 ] - %exitcond = icmp ne i64 %i.0, 16 - br i1 %exitcond, label %bb2, label %bb18 - -bb2: ; preds = %bb1 - %tmp = srem i64 %i.0, 2 - %tmp3 = icmp eq i64 %tmp, 0 - br i1 %tmp3, label %bb8, label %bb4 - -bb4: ; preds = %bb2 - %tmp5 = getelementptr inbounds float, ptr %A, i64 %i.0 - %tmp6 = load float, ptr %tmp5, align 4 - %tmp7 = fadd float %tmp6, 2.000000e+00 - store float %tmp7, ptr %tmp5, align 4 - br label %bb8 - -bb8: ; preds = %bb2, %bb4 - %tmp9 = srem i64 %i.0, 3 - %tmp10 = icmp eq i64 %tmp9, 0 - br i1 %tmp10, label %bb15, label %bb11 - -bb11: ; preds = %bb8 - %tmp12 = getelementptr inbounds float, ptr %A, i64 %i.0 - %tmp13 = load float, ptr %tmp12, align 4 - %tmp14 = fadd float %tmp13, 3.000000e+00 - store float %tmp14, ptr %tmp12, align 4 - br label %bb15 - -bb15: ; preds = %bb8, %bb11 - br label %bb16 - -bb16: ; preds = %bb15 - %tmp17 = add nsw i64 %i.0, 1 - br label %bb1 - -bb18: ; preds = %bb1 - ret void -} diff --git a/polly/test/CodeGen/invariant_load_hoist_alignment.ll b/polly/test/CodeGen/invariant_load_hoist_alignment.ll deleted file mode 100644 index 0ae07f7..0000000 --- a/polly/test/CodeGen/invariant_load_hoist_alignment.ll +++ /dev/null @@ -1,31 +0,0 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly -S \ -; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" -target triple = "x86_64-unknown-linux-gnu" - -@A = common global [1024 x i32] zeroinitializer, align 16 -@B = common global [1024 x i32] zeroinitializer, align 16 - -declare i32 @foo(i32) readnone - -define void @force_alignment() nounwind { -;CHECK: @force_alignment -entry: - br label %body - -body: - %indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ] - %scevgep = getelementptr [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvar -; CHECK: [[T2:%.load]] = load i32, i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @A, i32 0, i32 0), align 4 -; CHECK: %value_p.splatinsert = insertelement <4 x i32> poison, i32 [[T2]], i64 0 - %value = load i32, i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @A, i64 0, i64 0), align 4 - %result = tail call i32 @foo(i32 %value) nounwind - store i32 %result, i32* %scevgep, align 4 - %indvar_next = add i64 %indvar, 1 - %exitcond = icmp eq i64 %indvar_next, 4 - br i1 %exitcond, label %return, label %body - -return: - ret void -} - diff --git a/polly/test/CodeGen/partial_write_mapped_vector.ll b/polly/test/CodeGen/partial_write_mapped_vector.ll deleted file mode 100644 index 27d3a74..0000000 --- a/polly/test/CodeGen/partial_write_mapped_vector.ll +++ /dev/null @@ -1,57 +0,0 @@ -; RUN: opt %loadPolly -basic-aa -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-vectorizer=polly -polly-opt-isl -polly-ast -polly-codegen -S < %s | FileCheck %s -; -; Polly's vectorizer does not support partial accesses. -; -; for (int j = 0; j < 4; j += 1) { -;body: -; val = 21.0 + 21.0; -; if (j > 1) -;user: -; A[0] = val; -; } - -define void @partial_write_mapped_vector(ptr noalias nonnull %A) { -entry: - br label %for - -for: - %j = phi i32 [0, %entry], [%j.inc, %inc] - %j.cmp = icmp slt i32 %j, 4 - br i1 %j.cmp, label %body, label %exit - - body: - %val = fadd double 21.0, 21.0 - %if.cond = icmp sgt i32 %j, 1 - br i1 %if.cond, label %user, label %inc - - user: - %elt= getelementptr inbounds double, ptr %A, i32 %j - store double %val, ptr %elt - br label %inc - -inc: - %j.inc = add nuw nsw i32 %j, 1 - br label %for - -exit: - br label %return - -return: - ret void -} - - -; CHECK-LABEL: polly.stmt.body: -; CHECK-NEXT: %p_val = fadd double 2.100000e+01, 2.100000e+01 -; CHECK-NEXT: %0 = trunc i64 %polly.indvar to i32 -; CHECK-NEXT: %p_if.cond = icmp sgt i32 %0, 1 -; CHECK-NEXT: %1 = icmp sge i64 %polly.indvar, 2 -; CHECK-NEXT: %polly.Stmt_body_Write0.cond = icmp ne i1 %1, false -; CHECK-NEXT: br i1 %polly.Stmt_body_Write0.cond, label %polly.stmt.body.Stmt_body_Write0.partial, label %polly.stmt.body.cont - -; CHECK-LABEL: polly.stmt.body.Stmt_body_Write0.partial: -; CHECK-NEXT: %polly.access.A = getelementptr double, ptr %A, i64 1 -; CHECK-NEXT: store double %p_val, ptr %polly.access.A -; CHECK-NEXT: br label %polly.stmt.body.cont - -; CHECK-LABEL: polly.stmt.body.cont: diff --git a/polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop b/polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop deleted file mode 100644 index 2aadaf1..0000000 --- a/polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop +++ /dev/null @@ -1,39 +0,0 @@ -{ - "arrays" : [ - { - "name" : "MemRef_A", - "sizes" : [ "*" ], - "type" : "double" - } - ], - "context" : "{ : }", - "name" : "%for---%return", - "statements" : [ - { - "accesses" : [ - { - "kind" : "write", - "relation" : "{ Stmt_body[i0] -> MemRef_val[] }" - } - ], - "domain" : "{ Stmt_body[i0] : 0 <= i0 <= 3 }", - "name" : "Stmt_body", - "schedule" : "{ Stmt_body[i0] -> [i0, 0] }" - }, - { - "accesses" : [ - { - "kind" : "write", - "relation" : "{ Stmt_user[i0] -> MemRef_A[i0] }" - }, - { - "kind" : "read", - "relation" : "{ Stmt_user[i0] -> MemRef_val[] }" - } - ], - "domain" : "{ Stmt_user[i0] : 2 <= i0 <= 3 }", - "name" : "Stmt_user", - "schedule" : "{ Stmt_user[i0] -> [i0, 1] }" - } - ] -} diff --git a/polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop.transformed b/polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop.transformed deleted file mode 100644 index 39f97f0..0000000 --- a/polly/test/CodeGen/partial_write_mapped_vector___%for---%return.jscop.transformed +++ /dev/null @@ -1,39 +0,0 @@ -{ - "arrays" : [ - { - "name" : "MemRef_A", - "sizes" : [ "*" ], - "type" : "double" - } - ], - "context" : "{ : }", - "name" : "%for---%return", - "statements" : [ - { - "accesses" : [ - { - "kind" : "write", - "relation" : "{ Stmt_body[j] -> MemRef_A[1] : j > 1 }" - } - ], - "domain" : "{ Stmt_body[i0] : 0 <= i0 <= 3 }", - "name" : "Stmt_body", - "schedule" : "{ Stmt_body[i0] -> [i0, 0] }" - }, - { - "accesses" : [ - { - "kind" : "write", - "relation" : "{ Stmt_user[i0] -> MemRef_A[i0] }" - }, - { - "kind" : "read", - "relation" : "{ Stmt_user[j] -> MemRef_A[1] }" - } - ], - "domain" : "{ Stmt_user[i0] : 2 <= i0 <= 3 }", - "name" : "Stmt_user", - "schedule" : "{ Stmt_user[i0] -> [i0, 1] }" - } - ] -} diff --git a/polly/test/CodeGen/simple_vec_assign_scalar.ll b/polly/test/CodeGen/simple_vec_assign_scalar.ll deleted file mode 100644 index ae8a752..0000000 --- a/polly/test/CodeGen/simple_vec_assign_scalar.ll +++ /dev/null @@ -1,64 +0,0 @@ -; RUN: opt %loadPolly -basic-aa -polly-codegen \ -; RUN: -polly-vectorizer=polly -dce -S < %s | FileCheck %s - -; RUN: opt %loadPolly -basic-aa -polly-codegen -polly-vectorizer=stripmine -dce -S < %s | FileCheck %s --check-prefix=STRIPMINE - -;#define N 1024 -;float A[N]; -;float B[N]; -; -;void simple_vec_const(void) { -; int i; -; -; for (i = 0; i < 4; i++) -; B[i] = A[i] + 1; -;} -;int main() -;{ -; simple_vec_const(); -; return A[42]; -;} - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" - -@A = common global [1024 x float] zeroinitializer, align 16 -@B = common global [1024 x float] zeroinitializer, align 16 - -define void @simple_vec_const() nounwind { -bb: - br label %bb2 - -bb2: ; preds = %bb5, %bb - %indvar = phi i64 [ %indvar.next, %bb5 ], [ 0, %bb ] - %scevgep = getelementptr [1024 x float], ptr @B, i64 0, i64 %indvar - %scevgep1 = getelementptr [1024 x float], ptr @A, i64 0, i64 %indvar - %exitcond = icmp ne i64 %indvar, 4 - br i1 %exitcond, label %bb3, label %bb6 - -bb3: ; preds = %bb2 - %tmp = load float, ptr %scevgep1, align 4 - %tmp4 = fadd float %tmp, 1.000000e+00 - store float %tmp4, ptr %scevgep, align 4 - br label %bb5 - -bb5: ; preds = %bb3 - %indvar.next = add i64 %indvar, 1 - br label %bb2 - -bb6: ; preds = %bb2 - ret void -} - -define i32 @main() nounwind { -bb: - call void @simple_vec_const() - %tmp = load float, ptr getelementptr inbounds ([1024 x float], ptr @A, i64 0, i64 42), align 8 - %tmp1 = fptosi float %tmp to i32 - ret i32 %tmp1 -} - -; STRIPMINE-NOT: <4 x float> - -; CHECK: %tmp_p_vec_full = load <4 x float>, ptr @A, align 8, !alias.scope !0, !noalias !3 -; CHECK: %tmp4p_vec = fadd <4 x float> %tmp_p_vec_full, -; CHECK: store <4 x float> %tmp4p_vec, ptr @B diff --git a/polly/test/CodeGen/simple_vec_assign_scalar_2.ll b/polly/test/CodeGen/simple_vec_assign_scalar_2.ll deleted file mode 100644 index f26720f..0000000 --- a/polly/test/CodeGen/simple_vec_assign_scalar_2.ll +++ /dev/null @@ -1,65 +0,0 @@ -; RUN: opt %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly -dce -S < %s | FileCheck %s - -;#define N 1024 -;float A[N]; -;float B[N]; -; -;void simple_vec_const(void) { -; int i; -; -; for (i = 0; i < 4; i++) -; B[i] = A[i] + i; -;} -;int main() -;{ -; simple_vec_const(); -; return A[42]; -;} - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" - -@A = common global [1024 x float] zeroinitializer, align 16 -@B = common global [1024 x float] zeroinitializer, align 16 - -define void @simple_vec_const() nounwind { -bb: - br label %bb2 - -bb2: ; preds = %bb6, %bb - %indvar = phi i64 [ %indvar.next, %bb6 ], [ 0, %bb ] - %scevgep = getelementptr [1024 x float], ptr @B, i64 0, i64 %indvar - %i.0 = trunc i64 %indvar to i32 - %scevgep1 = getelementptr [1024 x float], ptr @A, i64 0, i64 %indvar - %exitcond = icmp ne i64 %indvar, 4 - br i1 %exitcond, label %bb3, label %bb7 - -bb3: ; preds = %bb2 - %tmp = load float, ptr %scevgep1, align 4 - %tmp4 = sitofp i32 %i.0 to float - %tmp5 = fadd float %tmp, %tmp4 - store float %tmp5, ptr %scevgep, align 4 - br label %bb6 - -bb6: ; preds = %bb3 - %indvar.next = add i64 %indvar, 1 - br label %bb2 - -bb7: ; preds = %bb2 - ret void -} - -define i32 @main() nounwind { -bb: - call void @simple_vec_const() - %tmp = load float, ptr getelementptr inbounds ([1024 x float], ptr @A, i64 0, i64 42), align 8 - %tmp1 = fptosi float %tmp to i32 - ret i32 %tmp1 -} - - -; CHECK: insertelement <4 x float> undef, float %{{[^,]+}}, i32 0 -; CHECK: insertelement <4 x float> %0, float %{{[^,]+}}, i32 1 -; CHECK: insertelement <4 x float> %1, float %{{[^,]+}}, i32 2 -; CHECK: insertelement <4 x float> %2, float %{{[^,]+}}, i32 3 -; CHECK: fadd <4 x float> %tmp_p_vec_full, %3 - diff --git a/polly/test/CodeGen/simple_vec_call.ll b/polly/test/CodeGen/simple_vec_call.ll deleted file mode 100644 index e5f2c12..0000000 --- a/polly/test/CodeGen/simple_vec_call.ll +++ /dev/null @@ -1,37 +0,0 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly -S \ -; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" - -@A = common global [1024 x float] zeroinitializer, align 16 -@B = common global [1024 x float] zeroinitializer, align 16 - -declare float @foo(float) readnone - -define void @simple_vec_call() nounwind { -entry: - br label %body - -body: - %indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ] - %scevgep = getelementptr [1024 x float], [1024 x float]* @B, i64 0, i64 %indvar - %value = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16 - %result = tail call float @foo(float %value) nounwind - store float %result, float* %scevgep, align 4 - %indvar_next = add i64 %indvar, 1 - %exitcond = icmp eq i64 %indvar_next, 4 - br i1 %exitcond, label %return, label %body - -return: - ret void -} - -; CHECK: [[RES1:%[a-zA-Z0-9_]+]] = tail call float @foo(float %.load) [[NUW:#[0-9]+]] -; CHECK: [[RES2:%[a-zA-Z0-9_]+]] = tail call float @foo(float %.load) [[NUW]] -; CHECK: [[RES3:%[a-zA-Z0-9_]+]] = tail call float @foo(float %.load) [[NUW]] -; CHECK: [[RES4:%[a-zA-Z0-9_]+]] = tail call float @foo(float %.load) [[NUW]] -; CHECK: [[RES5:%[a-zA-Z0-9_]+]] = insertelement <4 x float> undef, float [[RES1]], i32 0 -; CHECK: [[RES6:%[a-zA-Z0-9_]+]] = insertelement <4 x float> [[RES5]], float [[RES2]], i32 1 -; CHECK: [[RES7:%[a-zA-Z0-9_]+]] = insertelement <4 x float> [[RES6]], float [[RES3]], i32 2 -; CHECK: [[RES8:%[a-zA-Z0-9_]+]] = insertelement <4 x float> [[RES7]], float [[RES4]], i32 3 -; CHECK: store <4 x float> [[RES8]] -; CHECK: attributes [[NUW]] = { nounwind } diff --git a/polly/test/CodeGen/simple_vec_call_2.ll b/polly/test/CodeGen/simple_vec_call_2.ll deleted file mode 100644 index b376705..0000000 --- a/polly/test/CodeGen/simple_vec_call_2.ll +++ /dev/null @@ -1,37 +0,0 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly -dce \ -; RUN: -polly-invariant-load-hoisting=true -S < %s | FileCheck %s -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" - -@A = common global [1024 x float] zeroinitializer, align 16 -@B = common global [1024 x float**] zeroinitializer, align 16 - -declare float** @foo(float) readnone - -define void @simple_vec_call() nounwind { -entry: - br label %body - -body: - %indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ] - %scevgep = getelementptr [1024 x float**], [1024 x float**]* @B, i64 0, i64 %indvar - %value = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16 - %result = tail call float** @foo(float %value) nounwind - store float** %result, float*** %scevgep, align 4 - %indvar_next = add i64 %indvar, 1 - %exitcond = icmp eq i64 %indvar_next, 4 - br i1 %exitcond, label %return, label %body - -return: - ret void -} - -; CHECK: [[RES1:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW:#[0-9]+]] -; CHECK: [[RES2:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW]] -; CHECK: [[RES3:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW]] -; CHECK: [[RES4:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW]] -; CHECK: %0 = insertelement <4 x float**> undef, float** %p_result, i32 0 -; CHECK: %1 = insertelement <4 x float**> %0, float** %p_result1, i32 1 -; CHECK: %2 = insertelement <4 x float**> %1, float** %p_result2, i32 2 -; CHECK: %3 = insertelement <4 x float**> %2, float** %p_result3, i32 3 -; CHECK: store <4 x float**> %3, <4 x float**>* bitcast ([1024 x float**]* @B to <4 x float**>*), align -; CHECK: attributes [[NUW]] = { nounwind } diff --git a/polly/test/CodeGen/simple_vec_cast.ll b/polly/test/CodeGen/simple_vec_cast.ll deleted file mode 100644 index 7578663..0000000 --- a/polly/test/CodeGen/simple_vec_cast.ll +++ /dev/null @@ -1,38 +0,0 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly \ -; RUN: -polly-invariant-load-hoisting=true -dce -S < %s | FileCheck %s -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" - -@A = common global [1024 x float] zeroinitializer, align 16 -@B = common global [1024 x double] zeroinitializer, align 16 - -define void @simple_vec_const() nounwind { -bb: - br label %bb1 - -bb1: ; preds = %bb3, %bb - %indvar = phi i64 [ %indvar.next, %bb3 ], [ 0, %bb ] - %scevgep = getelementptr [1024 x double], [1024 x double]* @B, i64 0, i64 %indvar - %exitcond = icmp ne i64 %indvar, 4 - br i1 %exitcond, label %bb2, label %bb4 - -bb2: ; preds = %bb1 - %tmp = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16 - %tmp2 = fpext float %tmp to double - store double %tmp2, double* %scevgep, align 4 - br label %bb3 - -bb3: ; preds = %bb2 - %indvar.next = add i64 %indvar, 1 - br label %bb1 - -bb4: ; preds = %bb1 - ret void -} - -; CHECK: %.load = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i32 0, i32 0) - -; CHECK: polly.stmt.bb2: ; preds = %polly.start -; CHECK: %tmp_p.splatinsert = insertelement <4 x float> poison, float %.load, i64 0 -; CHECK: %tmp_p.splat = shufflevector <4 x float> %tmp_p.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer -; CHECK: %0 = fpext <4 x float> %tmp_p.splat to <4 x double> -; CHECK: store <4 x double> %0, <4 x double>* diff --git a/polly/test/CodeGen/simple_vec_const.ll b/polly/test/CodeGen/simple_vec_const.ll deleted file mode 100644 index cb5edb2..0000000 --- a/polly/test/CodeGen/simple_vec_const.ll +++ /dev/null @@ -1,60 +0,0 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly -S \ -; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s - -;#define N 1024 -;float A[N]; -;float B[N]; -; -;void simple_vec_const(void) { -; int i; -; -; for (i = 0; i < 4; i++) -; B[i] = A[0]; -;} -;int main() -;{ -; simple_vec_const(); -; return A[42]; -;} - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" - -@A = common global [1024 x float] zeroinitializer, align 16 -@B = common global [1024 x float] zeroinitializer, align 16 - -define void @simple_vec_const() nounwind { -;