summaryrefslogtreecommitdiffstats
path: root/polly/test/Isl/CodeGen/OpenMP
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-06-06 09:57:41 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-06-06 09:57:41 +0000
commit0767a511bae598ad6ee85fef9de35ada86478abd (patch)
tree568f665b6f1a141114c0d355b5477b1dddc153cf /polly/test/Isl/CodeGen/OpenMP
parent28d8637e256ecae16142966f59a54565b4700c0d (diff)
downloadbcm5719-llvm-0767a511bae598ad6ee85fef9de35ada86478abd.tar.gz
bcm5719-llvm-0767a511bae598ad6ee85fef9de35ada86478abd.zip
Use minimal types for generated expressions
We now use the minimal necessary bit width for the generated code. If operations might overflow (add/sub/mul) we will try to adjust the types in order to ensure a non-wrapping computation. If the type adjustment is not possible, thus the necessary type is bigger than the type value of --polly-max-expr-bit-width, we will use assumptions to verify the computation will not wrap. However, for run-time checks we cannot build assumptions but instead utilize overflow tracking intrinsics. llvm-svn: 271878
Diffstat (limited to 'polly/test/Isl/CodeGen/OpenMP')
-rw-r--r--polly/test/Isl/CodeGen/OpenMP/invariant_base_pointer_preloaded_pass_only_needed.ll2
-rw-r--r--polly/test/Isl/CodeGen/OpenMP/new_multidim_access.ll12
-rw-r--r--polly/test/Isl/CodeGen/OpenMP/recomputed-srem.ll2
3 files changed, 10 insertions, 6 deletions
diff --git a/polly/test/Isl/CodeGen/OpenMP/invariant_base_pointer_preloaded_pass_only_needed.ll b/polly/test/Isl/CodeGen/OpenMP/invariant_base_pointer_preloaded_pass_only_needed.ll
index b044684794a..77c48ed0ae7 100644
--- a/polly/test/Isl/CodeGen/OpenMP/invariant_base_pointer_preloaded_pass_only_needed.ll
+++ b/polly/test/Isl/CodeGen/OpenMP/invariant_base_pointer_preloaded_pass_only_needed.ll
@@ -15,7 +15,7 @@
; }
;
; i A[0] A
-; CHECK: %polly.par.userContext = alloca { i64, float, float* }
+; CHECK: %polly.par.userContext = alloca { i11, float, float* }
;
; CHECK: %polly.access.B.load =
; CHECK: %polly.subfn.storeaddr.polly.access.A.load = getelementptr inbounds
diff --git a/polly/test/Isl/CodeGen/OpenMP/new_multidim_access.ll b/polly/test/Isl/CodeGen/OpenMP/new_multidim_access.ll
index 74c0823b317..b87253a62d3 100644
--- a/polly/test/Isl/CodeGen/OpenMP/new_multidim_access.ll
+++ b/polly/test/Isl/CodeGen/OpenMP/new_multidim_access.ll
@@ -20,14 +20,18 @@
; CHECK: new: [n, m] -> { Stmt_bb4[i0, i1] -> MemRef_A[i0, 43 + i1] };
; IR: %polly.access.mul.polly.subfunc.arg.A = mul nsw i64 %polly.indvar, %polly.subfunc.arg.m
-; IR: %6 = add nsw i64 %polly.indvar5, 13
-; IR: %polly.access.add.polly.subfunc.arg.A = add nsw i64 %polly.access.mul.polly.subfunc.arg.A, %6
+; IR: %[[R0:[0-9]*]] = sext i8 %polly.indvar5 to i9
+; IR: %[[R1:[0-9]*]] = add nsw i9 %[[R0]], 13
+; IR: %[[R2:[0-9]*]] = sext i9 %[[R1]] to i64
+; IR: %polly.access.add.polly.subfunc.arg.A = add nsw i64 %polly.access.mul.polly.subfunc.arg.A, %[[R2]]
; IR: %polly.access.polly.subfunc.arg.A = getelementptr float, float* %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A
; IR: %tmp10_p_scalar_ = load float, float* %polly.access.polly.subfunc.arg.A, align 4, !alias.scope !0, !noalias !2, !llvm.mem.parallel_loop_access !3
; IR: %polly.access.mul.polly.subfunc.arg.A8 = mul nsw i64 %polly.indvar, %polly.subfunc.arg.m
-; IR: %7 = add nsw i64 %polly.indvar5, 43
-; IR: %polly.access.add.polly.subfunc.arg.A9 = add nsw i64 %polly.access.mul.polly.subfunc.arg.A8, %7
+; IR: %[[P0:[0-9]*]] = sext i8 %polly.indvar5 to i9
+; IR: %[[P1:[0-9]*]] = add nsw i9 %[[P0]], 43
+; IR: %[[P2:[0-9]*]] = sext i9 %[[P1]] to i64
+; IR: %polly.access.add.polly.subfunc.arg.A9 = add nsw i64 %polly.access.mul.polly.subfunc.arg.A8, %[[P2]]
; IR: %polly.access.polly.subfunc.arg.A10 = getelementptr float, float* %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A9
; IR: store float %p_tmp11, float* %polly.access.polly.subfunc.arg.A10, align 4, !alias.scope !0, !noalias !2, !llvm.mem.parallel_
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/polly/test/Isl/CodeGen/OpenMP/recomputed-srem.ll b/polly/test/Isl/CodeGen/OpenMP/recomputed-srem.ll
index c05830c2c23..9aff6d5f63d 100644
--- a/polly/test/Isl/CodeGen/OpenMP/recomputed-srem.ll
+++ b/polly/test/Isl/CodeGen/OpenMP/recomputed-srem.ll
@@ -3,7 +3,7 @@
;
; Test to verify that we pass %rem96 to the parallel subfunction.
;
-; CHECK: %[[R:[0-9]*]] = getelementptr inbounds { i32, i32, i64, float*, float*, i32 }, { i32, i32, i64, float*, float*, i32 }* %polly.par.userContext1, i32 0, i32 5
+; CHECK: %[[R:[0-9]*]] = getelementptr inbounds { i32, i32, float*, float*, i32 }, { i32, i32, float*, float*, i32 }* %polly.par.userContext1, i32 0, i32 4
; CHECK-NEXT: %polly.subfunc.arg.rem96 = load i32, i32* %[[R]]
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
OpenPOWER on IntegriCloud