summaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-03-17 14:45:41 +0100
committerNikita Popov <npopov@redhat.com>2023-03-17 15:09:11 +0100
commitfc78ebad051ac3e7564efc1a38a5e1faa8f30bf1 (patch)
treeca7e45d8110aa337a1dcb7f79e683166c84096a9 /polly
parent565b98e793422efbffaa2928f03bc943a1346a3e (diff)
downloadllvm-fc78ebad051ac3e7564efc1a38a5e1faa8f30bf1.tar.gz
[Polly] Convert some tests to opaque pointers (NFC)
Diffstat (limited to 'polly')
-rw-r--r--polly/test/CodeGen/aliasing_different_base_and_access_type.ll18
-rw-r--r--polly/test/CodeGen/aliasing_different_pointer_types.ll29
-rw-r--r--polly/test/CodeGen/aliasing_parametric_simple_1.ll28
-rw-r--r--polly/test/CodeGen/aliasing_parametric_simple_2.ll32
-rw-r--r--polly/test/CodeGen/annotated_alias_scopes.ll28
-rw-r--r--polly/test/CodeGen/invariant_load.ll19
-rw-r--r--polly/test/CodeGen/invariant_load_address_space.ll19
-rw-r--r--polly/test/CodeGen/invariant_load_base_pointer.ll17
-rw-r--r--polly/test/CodeGen/invariant_load_base_pointer_conditional.ll19
-rw-r--r--polly/test/CodeGen/invariant_load_base_pointer_conditional_2.ll34
-rw-r--r--polly/test/CodeGen/invariant_load_canonicalize_array_baseptrs.ll20
-rw-r--r--polly/test/CodeGen/invariant_load_condition.ll16
-rw-r--r--polly/test/CodeGen/invariant_load_escaping.ll20
-rw-r--r--polly/test/CodeGen/invariant_load_ptr_ptr_noalias.ll29
-rw-r--r--polly/test/CodeGen/invariant_load_scalar_dep.ll19
-rw-r--r--polly/test/CodeGen/load_subset_with_context.ll17
-rw-r--r--polly/test/CodeGen/loop_with_condition_nested.ll36
-rw-r--r--polly/test/CodeGen/multiple-types-invariant-load.ll23
-rw-r--r--polly/test/CodeGen/no-overflow-tracking.ll24
-rw-r--r--polly/test/CodeGen/non-affine-subregion-dominance-reuse.ll30
-rw-r--r--polly/test/CodeGen/non-affine-switch.ll25
-rw-r--r--polly/test/CodeGen/non-affine-synthesized-in-branch.ll14
-rw-r--r--polly/test/CodeGen/non-affine-update.ll31
-rw-r--r--polly/test/CodeGen/non_affine_float_compare.ll48
-rw-r--r--polly/test/CodeGen/partial_write_array.ll10
-rw-r--r--polly/test/CodeGen/partial_write_full_write_that_appears_partial.ll10
-rw-r--r--polly/test/CodeGen/partial_write_impossible_restriction.ll24
-rw-r--r--polly/test/CodeGen/partial_write_in_region.ll29
-rw-r--r--polly/test/CodeGen/phi_conditional_simple_1.ll20
-rw-r--r--polly/test/CodeGen/phi_loop_carried_float.ll24
-rw-r--r--polly/test/CodeGen/phi_loop_carried_float_escape.ll28
-rw-r--r--polly/test/CodeGen/region-with-instructions.ll19
-rw-r--r--polly/test/CodeGen/scev-backedgetaken.ll14
-rw-r--r--polly/test/CodeGen/scev_expansion_in_nonaffine.ll58
-rw-r--r--polly/test/CodeGen/scev_looking_through_bitcasts.ll16
-rw-r--r--polly/test/CodeGen/single_loop_param_less_equal.ll15
-rw-r--r--polly/test/CodeGen/single_loop_param_less_than.ll13
-rw-r--r--polly/test/CodeGen/stmt_split_no_dependence.ll16
-rw-r--r--polly/test/CodeGen/switch-in-non-affine-region.ll24
39 files changed, 461 insertions, 454 deletions
diff --git a/polly/test/CodeGen/aliasing_different_base_and_access_type.ll b/polly/test/CodeGen/aliasing_different_base_and_access_type.ll
index ddcda888e15f..a087414b8403 100644
--- a/polly/test/CodeGen/aliasing_different_base_and_access_type.ll
+++ b/polly/test/CodeGen/aliasing_different_base_and_access_type.ll
@@ -1,13 +1,12 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -S -polly-codegen < %s | FileCheck %s
+; RUN: opt %loadPolly -S -polly-codegen < %s | FileCheck %s
;
; We have to cast %B to "short *" before we create RTCs.
;
-; CHECK: %polly.access.cast.B = bitcast i32* %B to i16*
-; CHECK-NEXT: %polly.access.B = getelementptr i16, i16* %polly.access.cast.B, i64 1024
+; CHECK: %polly.access.B = getelementptr i16, ptr %B, i64 1024
;
; We should never access %B as an i32 pointer:
;
-; CHECK-NOT: getelementptr i32, i32* %B
+; CHECK-NOT: getelementptr i32, ptr %B
;
; void jd(int *A, int *B) {
; for (int i = 0; i < 1024; i++)
@@ -16,7 +15,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @jd(i32* %A, i32* %B) {
+define void @jd(ptr %A, ptr %B) {
entry:
br label %for.cond
@@ -26,12 +25,11 @@ for.cond: ; preds = %for.inc, %entry
br i1 %exitcond, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %tmp = bitcast i32* %B to i16*
- %arrayidx = getelementptr inbounds i16, i16* %tmp, i64 %indvars.iv
- %tmp1 = load i16, i16* %arrayidx, align 2
+ %arrayidx = getelementptr inbounds i16, ptr %B, i64 %indvars.iv
+ %tmp1 = load i16, ptr %arrayidx, align 2
%conv = sext i16 %tmp1 to i32
- %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %conv, i32* %arrayidx2, align 4
+ %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %conv, ptr %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
diff --git a/polly/test/CodeGen/aliasing_different_pointer_types.ll b/polly/test/CodeGen/aliasing_different_pointer_types.ll
index 94582676a3f9..91f5eab6b2a6 100644
--- a/polly/test/CodeGen/aliasing_different_pointer_types.ll
+++ b/polly/test/CodeGen/aliasing_different_pointer_types.ll
@@ -1,18 +1,18 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
; Check that we cast the different pointer types correctly before we compare
; them in the RTC's. We use i8* as max pointer type.
;
; CHECK: polly.split_new_and_old:
-; CHECK: %polly.access.B = getelementptr float*, float** %B, i64 1024
-; CHECK: %polly.access.A = getelementptr double*, double** %A, i64 0
-; CHECK: %[[paBb:[._a-zA-Z0-9]]] = ptrtoint float** %polly.access.B to i64
-; CHECK: %[[paAb:[._a-zA-Z0-9]]] = ptrtoint double** %polly.access.A to i64
+; CHECK: %polly.access.B = getelementptr ptr, ptr %B, i64 1024
+; CHECK: %polly.access.A = getelementptr ptr, ptr %A, i64 0
+; CHECK: %[[paBb:[._a-zA-Z0-9]]] = ptrtoint ptr %polly.access.B to i64
+; CHECK: %[[paAb:[._a-zA-Z0-9]]] = ptrtoint ptr %polly.access.A to i64
; CHECK: %[[ALeB:[._a-zA-Z0-9]]] = icmp ule i64 %[[paBb]], %[[paAb]]
-; CHECK: %polly.access.A1 = getelementptr double*, double** %A, i64 1024
-; CHECK: %polly.access.B2 = getelementptr float*, float** %B, i64 0
-; CHECK: %[[paA1b:[._a-zA-Z0-9]]] = ptrtoint double** %polly.access.A1 to i64
-; CHECK: %[[paB2b:[._a-zA-Z0-9]]] = ptrtoint float** %polly.access.B2 to i64
+; CHECK: %polly.access.A1 = getelementptr ptr, ptr %A, i64 1024
+; CHECK: %polly.access.B2 = getelementptr ptr, ptr %B, i64 0
+; CHECK: %[[paA1b:[._a-zA-Z0-9]]] = ptrtoint ptr %polly.access.A1 to i64
+; CHECK: %[[paB2b:[._a-zA-Z0-9]]] = ptrtoint ptr %polly.access.B2 to i64
; CHECK: %[[A1LeB2:[._a-zA-Z0-9]]] = icmp ule i64 %[[paA1b]], %[[paB2b]]
; CHECK: %[[le1OrLe2:[._a-zA-Z0-9]]] = or i1 %[[ALeB]], %[[A1LeB2]]
; CHECK: %[[orAndTrue:[._a-zA-Z0-9]]] = and i1 true, %[[le1OrLe2]]
@@ -24,7 +24,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @jd(double** %A, float** %B) {
+define void @jd(ptr %A, ptr %B) {
entry:
br label %for.cond
@@ -34,11 +34,10 @@ for.cond: ; preds = %for.inc, %entry
br i1 %exitcond, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %arrayidx = getelementptr inbounds float*, float** %B, i64 %indvars.iv
- %tmp = load float*, float** %arrayidx, align 8
- %tmp1 = bitcast float* %tmp to double*
- %arrayidx2 = getelementptr inbounds double*, double** %A, i64 %indvars.iv
- store double* %tmp1, double** %arrayidx2, align 8
+ %arrayidx = getelementptr inbounds ptr, ptr %B, i64 %indvars.iv
+ %tmp = load ptr, ptr %arrayidx, align 8
+ %arrayidx2 = getelementptr inbounds ptr, ptr %A, i64 %indvars.iv
+ store ptr %tmp, ptr %arrayidx2, align 8
br label %for.inc
for.inc: ; preds = %for.body
diff --git a/polly/test/CodeGen/aliasing_parametric_simple_1.ll b/polly/test/CodeGen/aliasing_parametric_simple_1.ll
index aa72882e909e..5422da4426e9 100644
--- a/polly/test/CodeGen/aliasing_parametric_simple_1.ll
+++ b/polly/test/CodeGen/aliasing_parametric_simple_1.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
; void jd(int *A, int *B, int c) {
; for (int i = 0; i < 1024; i++)
@@ -10,15 +10,15 @@
; CHECK: %[[Cp1O:[._a-zA-Z0-9]*]] = extractvalue { i64, i1 } %[[Cp1]], 1
; CHECK: %[[OS:[._a-zA-Z0-9]*]] = or i1 false, %[[Cp1O]]
; CHECK: %[[Cp1R:[._a-zA-Z0-9]*]] = extractvalue { i64, i1 } %[[Cp1]], 0
-; CHECK: %[[BMax:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %B, i64 %[[Cp1R]]
-; CHECK: %[[AMin:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %A, i64 0
-; CHECK: %[[BMaxI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[BMax]] to i64
-; CHECK: %[[AMinI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[AMin]] to i64
+; CHECK: %[[BMax:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %B, i64 %[[Cp1R]]
+; CHECK: %[[AMin:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %A, i64 0
+; CHECK: %[[BMaxI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[BMax]] to i64
+; CHECK: %[[AMinI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[AMin]] to i64
; CHECK: %[[BltA:[._a-zA-Z0-9]*]] = icmp ule i64 %[[BMaxI]], %[[AMinI]]
-; CHECK: %[[AMax:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %A, i64 1024
-; CHECK: %[[BMin:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %B, i32 %c
-; CHECK: %[[AMaxI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[AMax]] to i64
-; CHECK: %[[BMinI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[BMin]] to i64
+; CHECK: %[[AMax:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %A, i64 1024
+; CHECK: %[[BMin:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %B, i32 %c
+; CHECK: %[[AMaxI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[AMax]] to i64
+; CHECK: %[[BMinI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[BMin]] to i64
; CHECK: %[[AltB:[._a-zA-Z0-9]*]] = icmp ule i64 %[[AMaxI]], %[[BMinI]]
; CHECK: %[[NoAlias:[._a-zA-Z0-9]*]] = or i1 %[[BltA]], %[[AltB]]
; CHECK: %[[RTC:[._a-zA-Z0-9]*]] = and i1 true, %[[NoAlias]]
@@ -28,7 +28,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @jd(i32* %A, i32* %B, i32 %c) {
+define void @jd(ptr %A, ptr %B, i32 %c) {
entry:
br label %for.cond
@@ -39,10 +39,10 @@ for.cond: ; preds = %for.inc, %entry
for.body: ; preds = %for.cond
%idxprom = sext i32 %c to i64
- %arrayidx = getelementptr inbounds i32, i32* %B, i64 %idxprom
- %tmp = load i32, i32* %arrayidx, align 4
- %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %tmp, i32* %arrayidx2, align 4
+ %arrayidx = getelementptr inbounds i32, ptr %B, i64 %idxprom
+ %tmp = load i32, ptr %arrayidx, align 4
+ %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %tmp, ptr %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
diff --git a/polly/test/CodeGen/aliasing_parametric_simple_2.ll b/polly/test/CodeGen/aliasing_parametric_simple_2.ll
index 510d6def7b03..de945d403f92 100644
--- a/polly/test/CodeGen/aliasing_parametric_simple_2.ll
+++ b/polly/test/CodeGen/aliasing_parametric_simple_2.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
; void jd(int *A, int *B, int c) {
; for (int i = 0; i < 1024; i++)
@@ -13,12 +13,12 @@
; CHECK-NEXT: %[[M3R:[._a-zA-Z0-9]*]] = extractvalue { i64, i1 } %[[M3]], 0
; CHECK-NEXT: %[[M1:[._a-zA-Z0-9]*]] = icmp sgt i64 6, %[[M3R]]
; CHECK-NEXT: %[[M4:[._a-zA-Z0-9]*]] = select i1 %[[M1]], i64 6, i64 %[[M3R]]
-; CHECK-NEXT: %[[BMax:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %B, i64 %[[M4]]
-; CHECK-NEXT: %[[AMin:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %A, i64 0
-; CHECK-NEXT: %[[BMaxI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[BMax]] to i64
-; CHECK-NEXT: %[[AMinI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[AMin]] to i64
+; CHECK-NEXT: %[[BMax:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %B, i64 %[[M4]]
+; CHECK-NEXT: %[[AMin:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %A, i64 0
+; CHECK-NEXT: %[[BMaxI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[BMax]] to i64
+; CHECK-NEXT: %[[AMinI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[AMin]] to i64
; CHECK-NEXT: %[[BltA:[._a-zA-Z0-9]*]] = icmp ule i64 %[[BMaxI]], %[[AMinI]]
-; CHECK-NEXT: %[[AMax:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %A, i64 1024
+; CHECK-NEXT: %[[AMax:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %A, i64 1024
; CHECK-NEXT: %[[m0:[._a-zA-Z0-9]*]] = sext i32 %c to i64
; CHECK-NEXT: %[[m3:[._a-zA-Z0-9]*]] = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %[[m0]], i64 10)
; CHECK-NEXT: %[[m3O:[._a-zA-Z0-9]*]] = extractvalue { i64, i1 } %[[m3]], 1
@@ -26,9 +26,9 @@
; CHECK-NEXT: %[[m3R:[._a-zA-Z0-9]*]] = extractvalue { i64, i1 } %[[m3]], 0
; CHECK-NEXT: %[[m1:[._a-zA-Z0-9]*]] = icmp slt i64 5, %[[m3R]]
; CHECK-NEXT: %[[m4:[._a-zA-Z0-9]*]] = select i1 %[[m1]], i64 5, i64 %[[m3R]]
-; CHECK-NEXT: %[[BMin:[._a-zA-Z0-9]*]] = getelementptr i32, i32* %B, i64 %[[m4]]
-; CHECK-NEXT: %[[AMaxI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[AMax]] to i64
-; CHECK-NEXT: %[[BMinI:[._a-zA-Z0-9]*]] = ptrtoint i32* %[[BMin]] to i64
+; CHECK-NEXT: %[[BMin:[._a-zA-Z0-9]*]] = getelementptr i32, ptr %B, i64 %[[m4]]
+; CHECK-NEXT: %[[AMaxI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[AMax]] to i64
+; CHECK-NEXT: %[[BMinI:[._a-zA-Z0-9]*]] = ptrtoint ptr %[[BMin]] to i64
; CHECK-NEXT: %[[AltB:[._a-zA-Z0-9]*]] = icmp ule i64 %[[AMaxI]], %[[BMinI]]
; CHECK-NEXT: %[[NoAlias:[._a-zA-Z0-9]*]] = or i1 %[[BltA]], %[[AltB]]
; CHECK-NEXT: %[[RTC:[._a-zA-Z0-9]*]] = and i1 %[[Ctx]], %[[NoAlias]]
@@ -38,7 +38,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @jd(i32* %A, i32* %B, i32 %c) {
+define void @jd(ptr %A, ptr %B, i32 %c) {
entry:
br label %for.cond
@@ -50,13 +50,13 @@ for.cond: ; preds = %for.inc, %entry
for.body: ; preds = %for.cond
%sub = add nsw i32 %c, -10
%idxprom = sext i32 %sub to i64
- %arrayidx = getelementptr inbounds i32, i32* %B, i64 %idxprom
- %tmp = load i32, i32* %arrayidx, align 4
- %arrayidx1 = getelementptr inbounds i32, i32* %B, i64 5
- %tmp1 = load i32, i32* %arrayidx1, align 4
+ %arrayidx = getelementptr inbounds i32, ptr %B, i64 %idxprom
+ %tmp = load i32, ptr %arrayidx, align 4
+ %arrayidx1 = getelementptr inbounds i32, ptr %B, i64 5
+ %tmp1 = load i32, ptr %arrayidx1, align 4
%add = add nsw i32 %tmp, %tmp1
- %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %add, i32* %arrayidx3, align 4
+ %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %add, ptr %arrayidx3, align 4
br label %for.inc
for.inc: ; preds = %for.body
diff --git a/polly/test/CodeGen/annotated_alias_scopes.ll b/polly/test/CodeGen/annotated_alias_scopes.ll
index ae68af4e3433..f8d14cd34b62 100644
--- a/polly/test/CodeGen/annotated_alias_scopes.ll
+++ b/polly/test/CodeGen/annotated_alias_scopes.ll
@@ -1,14 +1,14 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s --check-prefix=SCOPES
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s --check-prefix=SCOPES
;
; Check that we create alias scopes that indicate the accesses to A, B and C cannot alias in any way.
;
; SCOPES-LABEL: polly.stmt.for.body:
-; SCOPES: %[[BIdx:[._a-zA-Z0-9]*]] = getelementptr{{.*}} i32* %B, i64 %polly.indvar
-; SCOPES: load i32, i32* %[[BIdx]], align 4, !alias.scope !0, !noalias !3
-; SCOPES: %[[CIdx:[._a-zA-Z0-9]*]] = getelementptr{{.*}} float* %C, i64 %polly.indvar
-; SCOPES: load float, float* %[[CIdx]], align 4, !alias.scope !6, !noalias !7
-; SCOPES: %[[AIdx:[._a-zA-Z0-9]*]] = getelementptr{{.*}} i32* %A, i64 %polly.indvar
-; SCOPES: store i32 %{{[._a-zA-Z0-9]*}}, i32* %[[AIdx]], align 4, !alias.scope !8, !noalias !9
+; SCOPES: %[[BIdx:[._a-zA-Z0-9]*]] = getelementptr{{.*}} ptr %B, i64 %{{.*}}
+; SCOPES: load i32, ptr %[[BIdx]], align 4, !alias.scope !0, !noalias !3
+; SCOPES: %[[CIdx:[._a-zA-Z0-9]*]] = getelementptr{{.*}} ptr %C, i64 %{{.*}}
+; SCOPES: load float, ptr %[[CIdx]], align 4, !alias.scope !6, !noalias !7
+; SCOPES: %[[AIdx:[._a-zA-Z0-9]*]] = getelementptr{{.*}} ptr %A, i64 %{{.*}}
+; SCOPES: store i32 %{{[._a-zA-Z0-9]*}}, ptr %[[AIdx]], align 4, !alias.scope !8, !noalias !9
;
; SCOPES: !0 = !{!1}
; SCOPES: !1 = distinct !{!1, !2, !"polly.alias.scope.MemRef_B"}
@@ -28,7 +28,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @jd(i32* %A, i32* %B, float* %C) {
+define void @jd(ptr %A, ptr %B, ptr %C) {
entry:
br label %for.cond
@@ -38,15 +38,15 @@ for.cond: ; preds = %for.inc, %entry
br i1 %exitcond, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %arrayidx = getelementptr inbounds i32, i32* %B, i64 %indvars.iv
- %tmp = load i32, i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, ptr %B, i64 %indvars.iv
+ %tmp = load i32, ptr %arrayidx, align 4
%conv = sitofp i32 %tmp to float
- %arrayidx2 = getelementptr inbounds float, float* %C, i64 %indvars.iv
- %tmp1 = load float, float* %arrayidx2, align 4
+ %arrayidx2 = getelementptr inbounds float, ptr %C, i64 %indvars.iv
+ %tmp1 = load float, ptr %arrayidx2, align 4
%add = fadd fast float %conv, %tmp1
%conv3 = fptosi float %add to i32
- %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %conv3, i32* %arrayidx5, align 4
+ %arrayidx5 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %conv3, ptr %arrayidx5, align 4
br label %for.inc
for.inc: ; preds = %for.body
diff --git a/polly/test/CodeGen/invariant_load.ll b/polly/test/CodeGen/invariant_load.ll
index 2414fc219846..be3f7a32f35b 100644
--- a/polly/test/CodeGen/invariant_load.ll
+++ b/polly/test/CodeGen/invariant_load.ll
@@ -1,12 +1,13 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
;
; CHECK-LABEL: polly.preload.begin:
-; CHECK-NEXT: %polly.access.B = getelementptr i32, i32* %B, i64 0
-; CHECK-NEXT: %polly.access.B.load = load i32, i32* %polly.access.B
+; CHECK-NEXT: %polly.access.B = getelementptr i32, ptr %B, i64 0
+; CHECK-NEXT: %polly.access.B.load = load i32, ptr %polly.access.B
;
; CHECK-LABEL: polly.stmt.bb2:
-; CHECK-NEXT: %scevgep = getelementptr i32, i32* %A, i64 %polly.indvar
-; CHECK-NEXT: store i32 %polly.access.B.load, i32* %scevgep, align 4
+; CHECK-NEXT: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK-NEXT: %scevgep = getelementptr i8, ptr %A, i64 %[[offset]]
+; CHECK-NEXT: store i32 %polly.access.B.load, ptr %scevgep, align 4
;
; void f(int *restrict A, int *restrict B) {
; for (int i = 0; i < 1024; i++)
@@ -15,7 +16,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32* noalias %A, i32* noalias %B) {
+define void @f(ptr noalias %A, ptr noalias %B) {
bb:
br label %bb1
@@ -25,9 +26,9 @@ bb1: ; preds = %bb4, %bb
br i1 %exitcond, label %bb2, label %bb5
bb2: ; preds = %bb1
- %tmp = load i32, i32* %B, align 4
- %tmp3 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %tmp, i32* %tmp3, align 4
+ %tmp = load i32, ptr %B, align 4
+ %tmp3 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %tmp, ptr %tmp3, align 4
br label %bb4
bb4: ; preds = %bb2
diff --git a/polly/test/CodeGen/invariant_load_address_space.ll b/polly/test/CodeGen/invariant_load_address_space.ll
index 4aac1aaee003..7c611ad3dd87 100644
--- a/polly/test/CodeGen/invariant_load_address_space.ll
+++ b/polly/test/CodeGen/invariant_load_address_space.ll
@@ -1,13 +1,14 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
;
; CHECK-LABEL: polly.preload.begin:
-; CHECK-NEXT: %polly.access.B = getelementptr i32, i32 addrspace(1)* %B, i64 0
+; CHECK-NEXT: %polly.access.B = getelementptr i32, ptr addrspace(1) %B, i64 0
; CHECK-NOT: addrspacecast
-; CHECK-NEXT: %polly.access.B.load = load i32, i32 addrspace(1)* %polly.access.B
+; CHECK-NEXT: %polly.access.B.load = load i32, ptr addrspace(1) %polly.access.B
;
; CHECK-LABEL: polly.stmt.bb2:
-; CHECK-NEXT: %scevgep = getelementptr i32, i32* %A, i64 %polly.indvar
-; CHECK-NEXT: store i32 %polly.access.B.load, i32* %scevgep, align 4
+; CHECK-NEXT: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK-NEXT: %scevgep = getelementptr i8, ptr %A, i64 %[[offset]]
+; CHECK-NEXT: store i32 %polly.access.B.load, ptr %scevgep, align 4
;
; void f(int *restrict A, int *restrict B) {
; for (int i = 0; i < 1024; i++)
@@ -16,7 +17,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32* noalias %A, i32 addrspace(1)* noalias %B) {
+define void @f(ptr noalias %A, ptr addrspace(1) noalias %B) {
bb:
br label %bb1
@@ -26,9 +27,9 @@ bb1: ; preds = %bb4, %bb
br i1 %exitcond, label %bb2, label %bb5
bb2: ; preds = %bb1
- %tmp = load i32, i32 addrspace(1)* %B, align 4
- %tmp3 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %tmp, i32* %tmp3, align 4
+ %tmp = load i32, ptr addrspace(1) %B, align 4
+ %tmp3 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %tmp, ptr %tmp3, align 4
br label %bb4
bb4: ; preds = %bb2
diff --git a/polly/test/CodeGen/invariant_load_base_pointer.ll b/polly/test/CodeGen/invariant_load_base_pointer.ll
index 951d4cd9e3b2..eb07f8317b79 100644
--- a/polly/test/CodeGen/invariant_load_base_pointer.ll
+++ b/polly/test/CodeGen/invariant_load_base_pointer.ll
@@ -1,11 +1,12 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -S < %s | FileCheck %s
;
; CHECK-LABEL: polly.preload.begin:
-; CHECK-NEXT: %polly.access.BPLoc = getelementptr i32*, i32** %BPLoc, i64 0
-; CHECK-NEXT: %polly.access.BPLoc.load = load i32*, i32** %polly.access.BPLoc
+; CHECK-NEXT: %polly.access.BPLoc = getelementptr ptr, ptr %BPLoc, i64 0
+; CHECK-NEXT: %polly.access.BPLoc.load = load ptr, ptr %polly.access.BPLoc
;
; CHECK-LABEL: polly.stmt.bb2:
-; CHECK-NEXT: %scevgep = getelementptr i32, i32* %polly.access.BPLoc.load, i64 %polly.indvar
+; CHECK-NEXT: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK-NEXT: %scevgep = getelementptr i8, ptr %polly.access.BPLoc.load, i64 %[[offset]]
;
; void f(int **BPLoc) {
; for (int i = 0; i < 1024; i++)
@@ -14,7 +15,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32** %BPLoc) {
+define void @f(ptr %BPLoc) {
bb:
br label %bb1
@@ -24,9 +25,9 @@ bb1: ; preds = %bb4, %bb
br i1 %exitcond, label %bb2, label %bb5
bb2: ; preds = %bb1
- %tmp = load i32*, i32** %BPLoc, align 8
- %tmp3 = getelementptr inbounds i32, i32* %tmp, i64 %indvars.iv
- store i32 0, i32* %tmp3, align 4
+ %tmp = load ptr, ptr %BPLoc, align 8
+ %tmp3 = getelementptr inbounds i32, ptr %tmp, i64 %indvars.iv
+ store i32 0, ptr %tmp3, align 4
br label %bb4
bb4: ; preds = %bb2
diff --git a/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll b/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll
index 472d79d26022..538077bb09e8 100644
--- a/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll
+++ b/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -S < %s | FileCheck %s
;
; CHECK-LABEL: polly.preload.begin:
; CHECK-NEXT: %0 = sext i32 %N to i64
@@ -10,10 +10,11 @@
; CHECK-NEXT: br i1 %polly.preload.cond.result, label %polly.preload.exec, label %polly.preload.merge
;
; CHECK-LABEL: polly.preload.merge:
-; CHECK-NEXT: %polly.preload.tmp6.merge = phi i32* [ %polly.access.BPLoc.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
+; CHECK-NEXT: %polly.preload.tmp6.merge = phi ptr [ %polly.access.BPLoc.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
;
; CHECK-LABEL: polly.stmt.bb5:
-; CHECK-NEXT: %scevgep9 = getelementptr i32, i32* %polly.preload.tmp6.merge, i64 %polly.indvar6
+; CHECK-NEXT: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar6, 2
+; CHECK-NEXT: %{{.*}} = getelementptr i8, ptr %polly.preload.tmp6.merge, i64 %[[offset]]
;
; void f(int **BPLoc, int *A, int N) {
; for (int i = 0; i < N; i++)
@@ -25,7 +26,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32** %BPLoc, i32* %A, i32 %N) {
+define void @f(ptr %BPLoc, ptr %A, i32 %N) {
bb:
%tmp = sext i32 %N to i64
br label %bb1
@@ -40,14 +41,14 @@ bb3: ; preds = %bb1
br i1 %tmp4, label %bb5, label %bb8
bb5: ; preds = %bb3
- %tmp6 = load i32*, i32** %BPLoc, align 8
- %tmp7 = getelementptr inbounds i32, i32* %tmp6, i64 %indvars.iv
- store i32 0, i32* %tmp7, align 4
+ %tmp6 = load ptr, ptr %BPLoc, align 8
+ %tmp7 = getelementptr inbounds i32, ptr %tmp6, i64 %indvars.iv
+ store i32 0, ptr %tmp7, align 4
br label %bb10
bb8: ; preds = %bb3
- %tmp9 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 0, i32* %tmp9, align 4
+ %tmp9 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 0, ptr %tmp9, align 4
br label %bb10
bb10: ; preds = %bb8, %bb5
diff --git a/polly/test/CodeGen/invariant_load_base_pointer_conditional_2.ll b/polly/test/CodeGen/invariant_load_base_pointer_conditional_2.ll
index e8e2c29f211e..7c2fb3ef97ed 100644
--- a/polly/test/CodeGen/invariant_load_base_pointer_conditional_2.ll
+++ b/polly/test/CodeGen/invariant_load_base_pointer_conditional_2.ll
@@ -1,6 +1,6 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-invariant-load-hoisting=true -polly-print-scops -disable-output < %s | FileCheck %s
-; RUN: opt -opaque-pointers=0 %loadPolly -S -polly-codegen -polly-invariant-load-hoisting=true < %s | FileCheck %s --check-prefix=IR
-; RUN: opt -opaque-pointers=0 %loadPolly -S -polly-codegen -polly-invariant-load-hoisting=true --polly-overflow-tracking=always < %s | FileCheck %s --check-prefix=IRA
+; RUN: opt %loadPolly -polly-invariant-load-hoisting=true -polly-print-scops -disable-output < %s | FileCheck %s
+; RUN: opt %loadPolly -S -polly-codegen -polly-invariant-load-hoisting=true < %s | FileCheck %s --check-prefix=IR
+; RUN: opt %loadPolly -S -polly-codegen -polly-invariant-load-hoisting=true --polly-overflow-tracking=always < %s | FileCheck %s --check-prefix=IRA
;
; As (p + q) can overflow we have to check that we load from
; I[p + q] only if it does not.
@@ -15,8 +15,8 @@
; CHECK-NEXT: }
;
; IR: polly.preload.merge:
-; IR-NEXT: %polly.preload.tmp1.merge = phi i32* [ %polly.access.I.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
-; IR-NEXT: store i32* %polly.preload.tmp1.merge, i32** %tmp1.preload.s2a
+; IR-NEXT: %polly.preload.tmp1.merge = phi ptr [ %polly.access.I.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
+; IR-NEXT: store ptr %polly.preload.tmp1.merge, ptr %tmp1.preload.s2a
; IR-NEXT: %12 = sext i32 %N to i64
; IR-NEXT: %13 = icmp sge i64 %12, 1
; IR-NEXT: %14 = sext i32 %q to i64
@@ -43,12 +43,12 @@
; IR-NEXT: br i1 %polly.preload.cond.result11
;
; IR: polly.preload.exec14:
-; IR-NEXT: %polly.access.polly.preload.tmp1.merge = getelementptr i32, i32* %polly.preload.tmp1.merge, i64 0
-; IR-NEXT: %polly.access.polly.preload.tmp1.merge.load = load i32, i32* %polly.access.polly.preload.tmp1.merge, align 4
+; IR-NEXT: %polly.access.polly.preload.tmp1.merge = getelementptr i32, ptr %polly.preload.tmp1.merge, i64 0
+; IR-NEXT: %polly.access.polly.preload.tmp1.merge.load = load i32, ptr %polly.access.polly.preload.tmp1.merge, align 4
;
; IRA: polly.preload.merge:
-; IRA-NEXT: %polly.preload.tmp1.merge = phi i32* [ %polly.access.I.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
-; IRA-NEXT: store i32* %polly.preload.tmp1.merge, i32** %tmp1.preload.s2a
+; IRA-NEXT: %polly.preload.tmp1.merge = phi ptr [ %polly.access.I.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
+; IRA-NEXT: store ptr %polly.preload.tmp1.merge, ptr %tmp1.preload.s2a
; IRA-NEXT: %12 = sext i32 %N to i64
; IRA-NEXT: %13 = icmp sge i64 %12, 1
; IRA-NEXT: %14 = sext i32 %q to i64
@@ -73,8 +73,8 @@
; IRA-NEXT: br i1 %polly.preload.cond.result10
;
; IRA: polly.preload.exec13:
-; IRA-NEXT: %polly.access.polly.preload.tmp1.merge = getelementptr i32, i32* %polly.preload.tmp1.merge, i64 0
-; IRA-NEXT: %polly.access.polly.preload.tmp1.merge.load = load i32, i32* %polly.access.polly.preload.tmp1.merge, align 4
+; IRA-NEXT: %polly.access.polly.preload.tmp1.merge = getelementptr i32, ptr %polly.preload.tmp1.merge, i64 0
+; IRA-NEXT: %polly.access.polly.preload.tmp1.merge.load = load i32, ptr %polly.access.polly.preload.tmp1.merge, align 4
;
; void f(int **I, int *A, int N, int p, int q) {
; for (int i = 0; i < N; i++)
@@ -83,7 +83,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32** %I, i32* %A, i32 %N, i32 %p, i32 %q) {
+define void @f(ptr %I, ptr %A, i32 %N, i32 %p, i32 %q) {
entry:
%tmp = sext i32 %N to i64
br label %for.cond
@@ -96,11 +96,11 @@ for.cond: ; preds = %for.inc, %entry
for.body: ; preds = %for.cond
%add = add i32 %p, %q
%idxprom = sext i32 %add to i64
- %arrayidx = getelementptr inbounds i32*, i32** %I, i64 %idxprom
- %tmp1 = load i32*, i32** %arrayidx, align 8
- %tmp2 = load i32, i32* %tmp1, align 4
- %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %tmp2, i32* %arrayidx2, align 4
+ %arrayidx = getelementptr inbounds ptr, ptr %I, i64 %idxprom
+ %tmp1 = load ptr, ptr %arrayidx, align 8
+ %tmp2 = load i32, ptr %tmp1, align 4
+ %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %tmp2, ptr %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
diff --git a/polly/test/CodeGen/invariant_load_canonicalize_array_baseptrs.ll b/polly/test/CodeGen/invariant_load_canonicalize_array_baseptrs.ll
index 0609a71b4104..dc5a4c890381 100644
--- a/polly/test/CodeGen/invariant_load_canonicalize_array_baseptrs.ll
+++ b/polly/test/CodeGen/invariant_load_canonicalize_array_baseptrs.ll
@@ -1,13 +1,13 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s \
+; RUN: opt %loadPolly -polly-codegen -S < %s \
; RUN: -polly-invariant-load-hoisting \
; RUN: | FileCheck %s
-; CHECK: %polly.access.A = getelementptr float*, float** %A, i64 0
-; CHECK: %polly.access.A.load = load float*, float** %polly.access.A
-; CHECK: store float 4.200000e+01, float* %polly.access.A.load
-; CHECK: store float 4.800000e+01, float* %polly.access.A.load
+; CHECK: %polly.access.A = getelementptr ptr, ptr %A, i64 0
+; CHECK: %polly.access.A.load = load ptr, ptr %polly.access.A
+; CHECK: store float 4.200000e+01, ptr %polly.access.A.load
+; CHECK: store float 4.800000e+01, ptr %polly.access.A.load
-define void @foo(float** %A) {
+define void @foo(ptr %A) {
start:
br label %loop
@@ -18,13 +18,13 @@ loop:
br i1 %icmp, label %body1, label %exit
body1:
- %baseA = load float*, float** %A
- store float 42.0, float* %baseA
+ %baseA = load ptr, ptr %A
+ store float 42.0, ptr %baseA
br label %body2
body2:
- %baseB = load float*, float** %A
- store float 48.0, float* %baseB
+ %baseB = load ptr, ptr %A
+ store float 48.0, ptr %baseB
br label %latch
latch:
diff --git a/polly/test/CodeGen/invariant_load_condition.ll b/polly/test/CodeGen/invariant_load_condition.ll
index 641765d2cc22..edf0814d8983 100644
--- a/polly/test/CodeGen/invariant_load_condition.ll
+++ b/polly/test/CodeGen/invariant_load_condition.ll
@@ -1,9 +1,9 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-process-unprofitable -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-process-unprofitable -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
;
; CHECK-LABEL: polly.preload.begin:
-; CHECK-NEXT: %polly.access.C = getelementptr i32, i32* %C, i64 0
-; CHECK-NEXT: %polly.access.C.load = load i32, i32* %polly.access.C
-; CHECK-NOT: %polly.access.C.load = load i32, i32* %polly.access.C
+; CHECK-NEXT: %polly.access.C = getelementptr i32, ptr %C, i64 0
+; CHECK-NEXT: %polly.access.C.load = load i32, ptr %polly.access.C
+; CHECK-NOT: %polly.access.C.load = load i32, ptr %polly.access.C
;
; CHECK-LABEL: polly.cond:
; CHECK-NEXT: %[[R0:[0-9]*]] = sext i32 %polly.access.C.load to i64
@@ -23,7 +23,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32* %A, i32* %C) {
+define void @f(ptr %A, ptr %C) {
bb:
br label %bb1
@@ -33,13 +33,13 @@ bb1: ; preds = %bb7, %bb
br i1 %exitcond, label %bb2, label %bb8
bb2: ; preds = %bb1
- %tmp = load i32, i32* %C, align 4
+ %tmp = load i32, ptr %C, align 4
%tmp3 = icmp eq i32 %tmp, 0
br i1 %tmp3, label %bb6, label %bb4
bb4: ; preds = %bb2
- %tmp5 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 0, i32* %tmp5, align 4
+ %tmp5 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 0, ptr %tmp5, align 4
br label %bb6
bb6: ; preds = %bb2, %bb4
diff --git a/polly/test/CodeGen/invariant_load_escaping.ll b/polly/test/CodeGen/invariant_load_escaping.ll
index 80c0c7ff6e5c..efccdf468a18 100644
--- a/polly/test/CodeGen/invariant_load_escaping.ll
+++ b/polly/test/CodeGen/invariant_load_escaping.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
;
; int f(int *A, int *B) {
; // Possible aliasing between A and B but if not then *B would be
@@ -16,9 +16,9 @@
; }
;
; CHECK: polly.preload.begin:
-; CHECK: %polly.access.B = getelementptr i32, i32* %B, i64 0
-; CHECK: %polly.access.B.load = load i32, i32* %polly.access.B
-; CHECK: store i32 %polly.access.B.load, i32* %tmp.preload.s2a
+; CHECK: %polly.access.B = getelementptr i32, ptr %B, i64 0
+; CHECK: %polly.access.B.load = load i32, ptr %polly.access.B
+; CHECK: store i32 %polly.access.B.load, ptr %tmp.preload.s2a
;
; CHECK: polly.merge_new_and_old:
; CHECK: %tmp.merge = phi i32 [ %tmp.final_reload, %polly.exiting ], [ %tmp, %do.cond ]
@@ -28,21 +28,21 @@
; CHECK: ret i32 %tmp.merge
;
; CHECK: polly.loop_exit:
-; CHECK: %tmp.final_reload = load i32, i32* %tmp.preload.s2a
+; CHECK: %tmp.final_reload = load i32, ptr %tmp.preload.s2a
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define i32 @f(i32* %A, i32* %B) {
+define i32 @f(ptr %A, ptr %B) {
entry:
br label %do.body
do.body: ; preds = %do.cond, %entry
%indvars.iv = phi i64 [ %indvars.iv.next, %do.cond ], [ 0, %entry ]
- %tmp = load i32, i32* %B, align 4
- %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp1 = load i32, i32* %arrayidx, align 4
+ %tmp = load i32, ptr %B, align 4
+ %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp1 = load i32, ptr %arrayidx, align 4
%add = add nsw i32 %tmp1, %tmp
- store i32 %add, i32* %arrayidx, align 4
+ store i32 %add, ptr %arrayidx, align 4
br label %do.cond
do.cond: ; preds = %do.body
diff --git a/polly/test/CodeGen/invariant_load_ptr_ptr_noalias.ll b/polly/test/CodeGen/invariant_load_ptr_ptr_noalias.ll
index bf599acbc7de..b4d4c55f0d9b 100644
--- a/polly/test/CodeGen/invariant_load_ptr_ptr_noalias.ll
+++ b/polly/test/CodeGen/invariant_load_ptr_ptr_noalias.ll
@@ -1,14 +1,15 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-process-unprofitable -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-process-unprofitable -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -S < %s | FileCheck %s
;
; CHECK-LABEL: polly.preload.begin:
-; CHECK: %polly.access.A = getelementptr i32**, i32*** %A, i64 42
-; CHECK: %polly.access.A.load = load i32**, i32*** %polly.access.A
-; CHECK: %polly.access.polly.access.A.load = getelementptr i32*, i32** %polly.access.A.load, i64 32
-; CHECK: %polly.access.polly.access.A.load.load = load i32*, i32** %polly.access.polly.access.A.load
+; CHECK: %polly.access.A = getelementptr ptr, ptr %A, i64 42
+; CHECK: %polly.access.A.load = load ptr, ptr %polly.access.A
+; CHECK: %polly.access.polly.access.A.load = getelementptr ptr, ptr %polly.access.A.load, i64 32
+; CHECK: %polly.access.polly.access.A.load.load = load ptr, ptr %polly.access.polly.access.A.load
;
; CHECK: polly.stmt.bb2:
-; CHECK: %scevgep = getelementptr i32, i32* %polly.access.polly.access.A.load.load, i64 %polly.indvar
-; CHECK: store i32 0, i32* %scevgep, align 4
+; CHECK: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK: %scevgep = getelementptr i8, ptr %polly.access.polly.access.A.load.load, i64 %[[offset]]
+; CHECK: store i32 0, ptr %scevgep, align 4
;
; void f(int ***A) {
; for (int i = 0; i < 1024; i++)
@@ -17,7 +18,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32*** %A) {
+define void @f(ptr %A) {
bb:
br label %bb1
@@ -27,12 +28,12 @@ bb1: ; preds = %bb7, %bb
br i1 %exitcond, label %bb2, label %bb8
bb2: ; preds = %bb1
- %tmp = getelementptr inbounds i32**, i32*** %A, i64 42
- %tmp3 = load i32**, i32*** %tmp, align 8
- %tmp4 = getelementptr inbounds i32*, i32** %tmp3, i64 32
- %tmp5 = load i32*, i32** %tmp4, align 8
- %tmp6 = getelementptr inbounds i32, i32* %tmp5, i64 %indvars.iv
- store i32 0, i32* %tmp6, align 4
+ %tmp = getelementptr inbounds ptr, ptr %A, i64 42
+ %tmp3 = load ptr, ptr %tmp, align 8
+ %tmp4 = getelementptr inbounds ptr, ptr %tmp3, i64 32
+ %tmp5 = load ptr, ptr %tmp4, align 8
+ %tmp6 = getelementptr inbounds i32, ptr %tmp5, i64 %indvars.iv
+ store i32 0, ptr %tmp6, align 4
br label %bb7
bb7: ; preds = %bb2
diff --git a/polly/test/CodeGen/invariant_load_scalar_dep.ll b/polly/test/CodeGen/invariant_load_scalar_dep.ll
index 6ab75cf546c1..05a40a4c47cc 100644
--- a/polly/test/CodeGen/invariant_load_scalar_dep.ll
+++ b/polly/test/CodeGen/invariant_load_scalar_dep.ll
@@ -1,12 +1,13 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -S < %s | FileCheck %s
;
; CHECK-LABEL: polly.preload.begin:
-; CHECK: %polly.access.B = getelementptr i32, i32* %B, i64 0
-; CHECK: %polly.access.B.load = load i32, i32* %polly.access.B
+; CHECK: %polly.access.B = getelementptr i32, ptr %B, i64 0
+; CHECK: %polly.access.B.load = load i32, ptr %polly.access.B
;
; CHECK-LABEL: polly.stmt.bb2.split:
-; CHECK: %scevgep = getelementptr i32, i32* %A, i64 %polly.indvar
-; CHECK: store i32 %polly.access.B.load, i32* %scevgep, align 4
+; CHECK-NEXT: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK-NEXT: %scevgep = getelementptr i8, ptr %A, i64 %[[offset]]
+; CHECK: store i32 %polly.access.B.load, ptr %scevgep, align 4
;
; void f(int *restrict A, int *restrict B) {
; for (int i = 0; i < 1024; i++)
@@ -17,7 +18,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32* noalias %A, i32* noalias %B) {
+define void @f(ptr noalias %A, ptr noalias %B) {
bb:
br label %bb1
@@ -27,12 +28,12 @@ bb1: ; preds = %bb4, %bb
br i1 %exitcond, label %bb2, label %bb5
bb2: ; preds = %bb1
- %tmp = load i32, i32* %B, align 4
+ %tmp = load i32, ptr %B, align 4
br label %bb2.split
bb2.split:
- %tmp3 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %tmp, i32* %tmp3, align 4
+ %tmp3 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %tmp, ptr %tmp3, align 4
br label %bb4
bb4: ; preds = %bb2
diff --git a/polly/test/CodeGen/load_subset_with_context.ll b/polly/test/CodeGen/load_subset_with_context.ll
index af8ba488970c..ef0e051d5635 100644
--- a/polly/test/CodeGen/load_subset_with_context.ll
+++ b/polly/test/CodeGen/load_subset_with_context.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
;
; A load must provide a value for every statement instance.
; Statement instances not in the SCoP's context are irrelevant.
@@ -21,7 +21,7 @@ for.body: ; preds = %for.cond33.preheade
br label %for.cond7.preheader
for.cond33.preheader: ; preds = %for.inc.3
- %tmp175 = load float, float* undef, align 4
+ %tmp175 = load float, ptr undef, align 4
%indvars.iv.next1000 = add nuw nsw i64 %indvars.iv999, 1
%exitcond1002 = icmp eq i64 %indvars.iv.next1000, 17
br i1 %exitcond1002, label %for.cond176.preheader, label %for.body
@@ -29,8 +29,8 @@ for.cond33.preheader: ; preds = %for.inc.3
for.cond7.preheader: ; preds = %for.inc.3, %for.body
%indvars.iv958 = phi i64 [ 0, %for.body ], [ %indvars.iv.next959, %for.inc.3 ]
%tmp20 = add nuw nsw i64 %indvars.iv958, %tmp5
- %arrayidx.2 = getelementptr inbounds [88 x float], [88 x float]* @ATH, i64 0, i64 0
- %tmp157 = load float, float* %arrayidx.2, align 4
+ %arrayidx.2 = getelementptr inbounds [88 x float], ptr @ATH, i64 0, i64 0
+ %tmp157 = load float, ptr %arrayidx.2, align 4
%tmp158 = add nuw nsw i64 %tmp20, 3
%cmp12.3 = icmp ult i64 %tmp158, 88
br i1 %cmp12.3, label %if.then.3, label %if.else.3
@@ -43,8 +43,8 @@ if.then.3: ; preds = %for.cond7.preheader
for.inc.3: ; preds = %if.then.3, %if.else.3
%min.1.3 = phi float [ undef, %if.then.3 ], [ %tmp157, %if.else.3 ]
- %arrayidx29 = getelementptr inbounds [56 x float], [56 x float]* %ath, i64 0, i64 %indvars.iv958
- store float %min.1.3, float* %arrayidx29, align 4
+ %arrayidx29 = getelementptr inbounds [56 x float], ptr %ath, i64 0, i64 %indvars.iv958
+ store float %min.1.3, ptr %arrayidx29, align 4
%indvars.iv.next959 = add nuw nsw i64 %indvars.iv958, 1
%exitcond961 = icmp eq i64 %indvars.iv.next959, 56
br i1 %exitcond961, label %for.cond33.preheader, label %for.cond7.preheader
@@ -52,6 +52,5 @@ for.inc.3: ; preds = %if.then.3, %if.else
; CHECK: polly.stmt.if.else.3:
-; CHECK-NEXT: %polly.access.cast.ath1 = bitcast [56 x float]* %ath to float*
-; CHECK-NEXT: %polly.access.ath2 = getelementptr float, float* %polly.access.cast.ath1, i64 %polly.indvar
-; CHECK-NEXT: %polly.access.ath2.reload = load float, float* %polly.access.ath2
+; CHECK-NEXT: %polly.access.ath1 = getelementptr float, ptr %ath, i64 %polly.indvar
+; CHECK-NEXT: %polly.access.ath1.reload = load float, ptr %polly.access.ath1
diff --git a/polly/test/CodeGen/loop_with_condition_nested.ll b/polly/test/CodeGen/loop_with_condition_nested.ll
index 72c5f8b4918d..24a49b47d9e6 100644
--- a/polly/test/CodeGen/loop_with_condition_nested.ll
+++ b/polly/test/CodeGen/loop_with_condition_nested.ll
@@ -1,5 +1,5 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-print-ast -disable-output < %s | FileCheck %s
-; RUN: opt -opaque-pointers=0 %loadPolly -basic-aa -polly-codegen < %s | opt -opaque-pointers=0 -passes='print<loops>' -disable-output 2>&1 | FileCheck %s -check-prefix=LOOPS
+; RUN: opt %loadPolly -basic-aa -polly-print-ast -disable-output < %s | FileCheck %s
+; RUN: opt %loadPolly -basic-aa -polly-codegen < %s | opt -passes='print<loops>' -disable-output 2>&1 | FileCheck %s -check-prefix=LOOPS
;#include <string.h>
@@ -49,8 +49,8 @@
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 i32] zeroinitializer, align 16 ; <[1024 x i32]*> [#uses=4]
-@B = common global [1024 x i32] zeroinitializer, align 16 ; <[1024 x i32]*> [#uses=4]
+@A = common global [1024 x i32] zeroinitializer, align 16 ; <ptr> [#uses=4]
+@B = common global [1024 x i32] zeroinitializer, align 16 ; <ptr> [#uses=4]
define void @loop_with_condition() nounwind {
bb0:
@@ -59,8 +59,8 @@ bb0:
bb1:
%indvar = phi i64 [ %indvar.next, %bb10 ], [ 0, %bb0 ] ; <i64> [#uses=5]
- %scevgep = getelementptr [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvar ; <i32*> [#uses=2]
- %scevgep1 = getelementptr [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvar ; <i32*> [#uses=1]
+ %scevgep = getelementptr [1024 x i32], ptr @A, i64 0, i64 %indvar ; <ptr> [#uses=2]
+ %scevgep1 = getelementptr [1024 x i32], ptr @B, i64 0, i64 %indvar ; <ptr> [#uses=1]
%i.0 = trunc i64 %indvar to i32 ; <i32> [#uses=2]
%exitcond = icmp ne i64 %indvar, 1024 ; <i1> [#uses=1]
br i1 %exitcond, label %bb2, label %bb11
@@ -74,18 +74,18 @@ bb4:
br i1 %var5, label %bb6, label %bb7
bb6:
- store i32 1, i32* %scevgep
+ store i32 1, ptr %scevgep
br label %bb8
bb7:
- store i32 2, i32* %scevgep
+ store i32 2, ptr %scevgep
br label %bb8
bb8:
br label %bb9
bb9:
- store i32 3, i32* %scevgep1
+ store i32 3, ptr %scevgep1
br label %bb10
bb10:
@@ -99,20 +99,20 @@ bb11:
define i32 @main() nounwind {
; <label>:0
- call void @llvm.memset.p0i8.i64(i8* bitcast ([1024 x i32]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)
- call void @llvm.memset.p0i8.i64(i8* bitcast ([1024 x i32]* @B to i8*), i8 0, i64 4096, i32 1, i1 false)
+ call void @llvm.memset.p0.i64(ptr @A, i8 0, i64 4096, i32 1, i1 false)
+ call void @llvm.memset.p0.i64(ptr @B, i8 0, i64 4096, i32 1, i1 false)
call void @loop_with_condition()
br label %1
; <label>:1 ; preds = %8, %0
%indvar1 = phi i64 [ %indvar.next2, %8 ], [ 0, %0 ] ; <i64> [#uses=3]
- %scevgep3 = getelementptr [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvar1 ; <i32*> [#uses=1]
+ %scevgep3 = getelementptr [1024 x i32], ptr @B, i64 0, i64 %indvar1 ; <ptr> [#uses=1]
%i.0 = trunc i64 %indvar1 to i32 ; <i32> [#uses=1]
%2 = icmp slt i32 %i.0, 1024 ; <i1> [#uses=1]
br i1 %2, label %3, label %9
; <label>:3 ; preds = %1
- %4 = load i32, i32* %scevgep3 ; <i32> [#uses=1]
+ %4 = load i32, ptr %scevgep3 ; <i32> [#uses=1]
%5 = icmp ne i32 %4, 3 ; <i1> [#uses=1]
br i1 %5, label %6, label %7
@@ -131,7 +131,7 @@ define i32 @main() nounwind {
; <label>:10 ; preds = %37, %9
%indvar = phi i64 [ %indvar.next, %37 ], [ 0, %9 ] ; <i64> [#uses=3]
- %scevgep = getelementptr [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvar ; <i32*> [#uses=3]
+ %scevgep = getelementptr [1024 x i32], ptr @A, i64 0, i64 %indvar ; <ptr> [#uses=3]
%i.1 = trunc i64 %indvar to i32 ; <i32> [#uses=6]
%11 = icmp slt i32 %i.1, 1024 ; <i1> [#uses=1]
br i1 %11, label %12, label %38
@@ -145,7 +145,7 @@ define i32 @main() nounwind {
br i1 %15, label %16, label %20
; <label>:16 ; preds = %14
- %17 = load i32, i32* %scevgep ; <i32> [#uses=1]
+ %17 = load i32, ptr %scevgep ; <i32> [#uses=1]
%18 = icmp ne i32 %17, 1 ; <i1> [#uses=1]
br i1 %18, label %19, label %20
@@ -161,7 +161,7 @@ define i32 @main() nounwind {
br i1 %23, label %24, label %28
; <label>:24 ; preds = %22
- %25 = load i32, i32* %scevgep ; <i32> [#uses=1]
+ %25 = load i32, ptr %scevgep ; <i32> [#uses=1]
%26 = icmp ne i32 %25, 2 ; <i1> [#uses=1]
br i1 %26, label %27, label %28
@@ -173,7 +173,7 @@ define i32 @main() nounwind {
br i1 %29, label %30, label %34
; <label>:30 ; preds = %28
- %31 = load i32, i32* %scevgep ; <i32> [#uses=1]
+ %31 = load i32, ptr %scevgep ; <i32> [#uses=1]
%32 = icmp ne i32 %31, 0 ; <i1> [#uses=1]
br i1 %32, label %33, label %34
@@ -201,7 +201,7 @@ define i32 @main() nounwind {
ret i32 %.0
}
-declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
+declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i32, i1) nounwind
; CHECK: for (int c0 = 0; c0 <= 1023; c0 += 1) {
; CHECK: if (c0 <= 20) {
diff --git a/polly/test/CodeGen/multiple-types-invariant-load.ll b/polly/test/CodeGen/multiple-types-invariant-load.ll
index e2a2d6aea891..b1434679e3d1 100644
--- a/polly/test/CodeGen/multiple-types-invariant-load.ll
+++ b/polly/test/CodeGen/multiple-types-invariant-load.ll
@@ -1,29 +1,28 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-allow-differing-element-types -polly-codegen -S \
+; RUN: opt %loadPolly -polly-allow-differing-element-types -polly-codegen -S \
; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s
-; CHECK: %polly.access.cast.global.load = bitcast %struct.hoge* %global.load to i32*
-; CHECK: %polly.access.global.load = getelementptr i32, i32* %polly.access.cast.global.load, i64 0
-; CHECK: %polly.access.global.load.load = load i32, i32* %polly.access.global.load
+; CHECK: %polly.access.global.load = getelementptr i32, ptr %global.load, i64 0
+; CHECK: %polly.access.global.load.load = load i32, ptr %polly.access.global.load
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.hoge = type { i32, double }
-@global = external global %struct.hoge*, align 8
+@global = external global ptr, align 8
; Function Attrs: nounwind uwtable
-define void @widget(double* %A) #0 {
+define void @widget(ptr %A) #0 {
bb:
br label %bb4
bb4:
- %tmp = load %struct.hoge*, %struct.hoge** @global
- %tmp5 = getelementptr inbounds %struct.hoge, %struct.hoge* %tmp, i64 0, i32 0
- %tmp6 = load i32, i32* %tmp5
- %tmp7 = getelementptr inbounds %struct.hoge, %struct.hoge* %tmp, i64 0, i32 1
- %tmp8 = load double, double* %tmp7
- store double %tmp8, double* %A
+ %tmp = load ptr, ptr @global
+ %tmp5 = getelementptr inbounds %struct.hoge, ptr %tmp, i64 0, i32 0
+ %tmp6 = load i32, ptr %tmp5
+ %tmp7 = getelementptr inbounds %struct.hoge, ptr %tmp, i64 0, i32 1
+ %tmp8 = load double, ptr %tmp7
+ store double %tmp8, ptr %A
br i1 false, label %bb11, label %bb12
bb11:
diff --git a/polly/test/CodeGen/no-overflow-tracking.ll b/polly/test/CodeGen/no-overflow-tracking.ll
index 120751ce2987..f11e8927ddee 100644
--- a/polly/test/CodeGen/no-overflow-tracking.ll
+++ b/polly/test/CodeGen/no-overflow-tracking.ll
@@ -1,5 +1,5 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-invariant-load-hoisting=true -polly-print-scops -disable-output < %s | FileCheck %s
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-invariant-load-hoisting=true -polly-overflow-tracking=never -polly-codegen -S < %s | FileCheck %s --check-prefix=IR
+; RUN: opt %loadPolly -polly-invariant-load-hoisting=true -polly-print-scops -disable-output < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-invariant-load-hoisting=true -polly-overflow-tracking=never -polly-codegen -S < %s | FileCheck %s --check-prefix=IR
;
; As (p + q) can overflow we have to check that we load from
; I[p + q] only if it does not.
@@ -14,8 +14,8 @@
; CHECK-NEXT: }
;
; IR: polly.preload.merge:
-; IR-NEXT: %polly.preload.tmp1.merge = phi i32* [ %polly.access.I.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
-; IR-NEXT: store i32* %polly.preload.tmp1.merge, i32** %tmp1.preload.s2a
+; IR-NEXT: %polly.preload.tmp1.merge = phi ptr [ %polly.access.I.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
+; IR-NEXT: store ptr %polly.preload.tmp1.merge, ptr %tmp1.preload.s2a
; IR-NEXT: %12 = sext i32 %N to i64
; IR-NEXT: %13 = icmp sge i64 %12, 1
; IR-NEXT: %14 = sext i32 %q to i64
@@ -35,8 +35,8 @@
; IR-NEXT: br i1 %polly.preload.cond.result1
;
; IR: polly.preload.exec4:
-; IR-NEXT: %polly.access.polly.preload.tmp1.merge = getelementptr i32, i32* %polly.preload.tmp1.merge, i64 0
-; IR-NEXT: %polly.access.polly.preload.tmp1.merge.load = load i32, i32* %polly.access.polly.preload.tmp1.merge, align 4
+; IR-NEXT: %polly.access.polly.preload.tmp1.merge = getelementptr i32, ptr %polly.preload.tmp1.merge, i64 0
+; IR-NEXT: %polly.access.polly.preload.tmp1.merge.load = load i32, ptr %polly.access.polly.preload.tmp1.merge, align 4
;
; void f(int **I, int *A, int N, int p, int q) {
; for (int i = 0; i < N; i++)
@@ -45,7 +45,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32** %I, i32* %A, i32 %N, i32 %p, i32 %q) {
+define void @f(ptr %I, ptr %A, i32 %N, i32 %p, i32 %q) {
entry:
%tmp = sext i32 %N to i64
br label %for.cond
@@ -58,11 +58,11 @@ for.cond: ; preds = %for.inc, %entry
for.body: ; preds = %for.cond
%add = add i32 %p, %q
%idxprom = sext i32 %add to i64
- %arrayidx = getelementptr inbounds i32*, i32** %I, i64 %idxprom
- %tmp1 = load i32*, i32** %arrayidx, align 8
- %tmp2 = load i32, i32* %tmp1, align 4
- %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %tmp2, i32* %arrayidx2, align 4
+ %arrayidx = getelementptr inbounds ptr, ptr %I, i64 %idxprom
+ %tmp1 = load ptr, ptr %arrayidx, align 8
+ %tmp2 = load i32, ptr %tmp1, align 4
+ %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %tmp2, ptr %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
diff --git a/polly/test/CodeGen/non-affine-subregion-dominance-reuse.ll b/polly/test/CodeGen/non-affine-subregion-dominance-reuse.ll
index 4600ef060295..6c749a404336 100644
--- a/polly/test/CodeGen/non-affine-subregion-dominance-reuse.ll
+++ b/polly/test/CodeGen/non-affine-subregion-dominance-reuse.ll
@@ -1,11 +1,11 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S -verify-dom-info \
+; RUN: opt %loadPolly -polly-codegen -S -verify-dom-info \
; RUN: < %s | FileCheck %s
;
; Check that we do not reuse the B[i-1] GEP created in block S again in
; block Q. Hence, we create two GEPs for B[i-1]:
;
-; CHECK: %scevgep{{.}} = getelementptr i32, i32* %B, i64 -1
-; CHECK: %scevgep{{.}} = getelementptr i32, i32* %B, i64 -1
+; CHECK: %scevgep{{.}} = getelementptr i8, ptr %B, i64 -4
+; CHECK: %scevgep{{.}} = getelementptr i8, ptr %B, i64 -4
;
; void f(int *A, int *B) {
; int x = 0;
@@ -20,7 +20,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32* %A, i32* %B) {
+define void @f(ptr %A, ptr %B) {
bb:
br label %bb1
@@ -30,8 +30,8 @@ bb1: ; preds = %bb22, %bb
br i1 %exitcond, label %bb2, label %bb23
bb2: ; preds = %bb1
- %tmp = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp3 = load i32, i32* %tmp, align 4
+ %tmp = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp3 = load i32, ptr %tmp, align 4
%tmp4 = icmp eq i32 %tmp3, 0
br i1 %tmp4, label %bb21, label %bb5
@@ -44,10 +44,10 @@ bb7: ; preds = %bb5
bb8: ; preds = %bb7
%tmp9 = add nsw i64 %indvars.iv, -1
- %tmp10 = getelementptr inbounds i32, i32* %B, i64 %tmp9
- %tmp11 = load i32, i32* %tmp10, align 4
- %tmp12 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %tmp11, i32* %tmp12, align 4
+ %tmp10 = getelementptr inbounds i32, ptr %B, i64 %tmp9
+ %tmp11 = load i32, ptr %tmp10, align 4
+ %tmp12 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %tmp11, ptr %tmp12, align 4
br label %bb13
bb13: ; preds = %bb8, %bb5
@@ -55,12 +55,12 @@ bb13: ; preds = %bb8, %bb5
bb14: ; preds = %bb13
%tmp15 = add nsw i64 %indvars.iv, -1
- %tmp16 = getelementptr inbounds i32, i32* %B, i64 %tmp15
- %tmp17 = load i32, i32* %tmp16, align 4
- %tmp18 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp19 = load i32, i32* %tmp18, align 4
+ %tmp16 = getelementptr inbounds i32, ptr %B, i64 %tmp15
+ %tmp17 = load i32, ptr %tmp16, align 4
+ %tmp18 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp19 = load i32, ptr %tmp18, align 4
%tmp20 = add nsw i32 %tmp19, %tmp17
- store i32 %tmp20, i32* %tmp18, align 4
+ store i32 %tmp20, ptr %tmp18, align 4
br label %bb21
bb21: ; preds = %bb2, %bb14
diff --git a/polly/test/CodeGen/non-affine-switch.ll b/polly/test/CodeGen/non-affine-switch.ll
index 11f88a62975c..9c08b98700ae 100644
--- a/polly/test/CodeGen/non-affine-switch.ll
+++ b/polly/test/CodeGen/non-affine-switch.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly \
+; RUN: opt %loadPolly \
; RUN: -S -polly-codegen < %s | FileCheck %s
;
; void f(int *A, int N) {
@@ -14,8 +14,9 @@
; }
;
; CHECK: polly.stmt.for.body:
-; CHECK: %scevgep = getelementptr i32, i32* %A, i64 %polly.indvar
-; CHECK: %tmp1_p_scalar_ = load i32, i32* %scevgep, align 4
+; CHECK: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK: %scevgep = getelementptr i8, ptr %A, i64 %[[offset]]
+; CHECK: %tmp1_p_scalar_ = load i32, ptr %scevgep, align 4
; CHECK: switch i32 %tmp1_p_scalar_, label %polly.stmt.sw.epilog.exit [
; CHECK: i32 0, label %polly.stmt.sw.bb
; CHECK: i32 1, label %polly.stmt.sw.bb.3
@@ -23,7 +24,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32* %A, i32 %N) {
+define void @f(ptr %A, i32 %N) {
entry:
%tmp = sext i32 %N to i64
br label %for.cond
@@ -34,25 +35,25 @@ for.cond: ; preds = %for.inc, %entry
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp1 = load i32, i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp1 = load i32, ptr %arrayidx, align 4
switch i32 %tmp1, label %sw.epilog [
i32 0, label %sw.bb
i32 1, label %sw.bb.3
]
sw.bb: ; preds = %for.body
- %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp2 = load i32, i32* %arrayidx2, align 4
+ %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp2 = load i32, ptr %arrayidx2, align 4
%add = add nsw i32 %tmp2, 1
- store i32 %add, i32* %arrayidx2, align 4
+ store i32 %add, ptr %arrayidx2, align 4
br label %sw.epilog
sw.bb.3: ; preds = %for.body
- %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp3 = load i32, i32* %arrayidx5, align 4
+ %arrayidx5 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp3 = load i32, ptr %arrayidx5, align 4
%add6 = add nsw i32 %tmp3, 2
- store i32 %add6, i32* %arrayidx5, align 4
+ store i32 %add6, ptr %arrayidx5, align 4
br label %sw.epilog
sw.epilog: ; preds = %sw.bb.3, %sw.bb, %for.body
diff --git a/polly/test/CodeGen/non-affine-synthesized-in-branch.ll b/polly/test/CodeGen/non-affine-synthesized-in-branch.ll
index e6fce9054248..cc0e60abcd09 100644
--- a/polly/test/CodeGen/non-affine-synthesized-in-branch.ll
+++ b/polly/test/CodeGen/non-affine-synthesized-in-branch.ll
@@ -1,30 +1,30 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-process-unprofitable -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-process-unprofitable -polly-codegen -S < %s | FileCheck %s
;
; llvm.org/PR25412
; %synthgep caused %gep to be synthesized in subregion_if which was reused for
; %retval in subregion_exit, even though it is not dominating subregion_exit.
;
; CHECK-LABEL: polly.stmt.polly.merge_new_and_old.exit:
-; CHECK: %scevgep[[R1:[0-9]*]] = getelementptr %struct.hoge, %struct.hoge* %arg, i64 0, i32 2
-; CHECK: store double* %scevgep[[R1]], double** %gep.s2a
+; CHECK: %scevgep[[R1:[0-9]*]] = getelementptr i8, ptr %arg, i64 16
+; CHECK: store ptr %scevgep[[R1]], ptr %gep.s2a
; CHECK: br label
%struct.hoge = type { double, double, double }
-define double @func(%struct.hoge* %arg) {
+define double @func(ptr %arg) {
entry:
br label %subregion_entry
subregion_entry:
- %gep = getelementptr inbounds %struct.hoge, %struct.hoge* %arg, i64 0, i32 2
+ %gep = getelementptr inbounds %struct.hoge, ptr %arg, i64 0, i32 2
%cond = fcmp ogt double undef, undef
br i1 %cond, label %subregion_if, label %subregion_exit
subregion_if:
- %synthgep = load double, double* %gep
+ %synthgep = load double, ptr %gep
br label %subregion_exit
subregion_exit:
- %retval = load double, double* %gep
+ %retval = load double, ptr %gep
ret double %retval
}
diff --git a/polly/test/CodeGen/non-affine-update.ll b/polly/test/CodeGen/non-affine-update.ll
index 4c9007259dc3..d2b7fae75b23 100644
--- a/polly/test/CodeGen/non-affine-update.ll
+++ b/polly/test/CodeGen/non-affine-update.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-import-jscop \
+; RUN: opt %loadPolly -polly-import-jscop \
; RUN: -polly-codegen -S < %s | FileCheck %s
;
; void non-affine-update(double A[], double C[], double B[]) {
@@ -15,20 +15,21 @@
; unique within non-affine scop statements.
; CHECK: polly.stmt.bb2:
-; CHECK: %scevgep = getelementptr double, double* %A, i64 %polly.indvar
+; CHECK: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 3
+; CHECK: %scevgep = getelementptr i8, ptr %A, i64 %[[offset]]
; CHECK: polly.stmt.bb9:
-; CHECK: %polly.access.C{{.*}} = getelementptr double, double* %C, i64 42
-; CHECK: %polly.access.C{{.*}} = getelementptr double, double* %C, i64 42
+; CHECK: %polly.access.C{{.*}} = getelementptr double, ptr %C, i64 42
+; CHECK: %polly.access.C{{.*}} = getelementptr double, ptr %C, i64 42
; CHECK: polly.stmt.bb5:
-; CHECK: %polly.access.B{{.*}} = getelementptr double, double* %B, i64 113
-; CHECK: %polly.access.B{{.*}} = getelementptr double, double* %B, i64 113
+; CHECK: %polly.access.B{{.*}} = getelementptr double, ptr %B, i64 113
+; CHECK: %polly.access.B{{.*}} = getelementptr double, ptr %B, i64 113
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @non-affine-update(double* %A, double* %C, double* %B) {
+define void @non-affine-update(ptr %A, ptr %C, ptr %B) {
bb:
br label %bb1
@@ -38,23 +39,23 @@ bb1: ; preds = %bb14, %bb
br i1 %exitcond, label %bb2, label %bb15
bb2: ; preds = %bb1
- %tmp = getelementptr inbounds double, double* %A, i64 %indvars.iv
- %tmp3 = load double, double* %tmp, align 8
+ %tmp = getelementptr inbounds double, ptr %A, i64 %indvars.iv
+ %tmp3 = load double, ptr %tmp, align 8
%tmp4 = fcmp ult double %tmp3, 6.000000e+00
br i1 %tmp4, label %bb9, label %bb5
bb5: ; preds = %bb2
- %tmp6 = getelementptr inbounds double, double* %B, i64 %indvars.iv
- %tmp7 = load double, double* %tmp6, align 8
+ %tmp6 = getelementptr inbounds double, ptr %B, i64 %indvars.iv
+ %tmp7 = load double, ptr %tmp6, align 8
%tmp8 = fadd double %tmp7, 4.200000e+01
- store double %tmp8, double* %tmp6, align 8
+ store double %tmp8, ptr %tmp6, align 8
br label %bb13
bb9: ; preds = %bb2
- %tmp10 = getelementptr inbounds double, double* %C, i64 %indvars.iv
- %tmp11 = load double, double* %tmp10, align 8
+ %tmp10 = getelementptr inbounds double, ptr %C, i64 %indvars.iv
+ %tmp11 = load double, ptr %tmp10, align 8
%tmp12 = fadd double %tmp11, 3.000000e+00
- store double %tmp12, double* %tmp10, align 8
+ store double %tmp12, ptr %tmp10, align 8
br label %bb13
bb13: ; preds = %bb9, %bb5
diff --git a/polly/test/CodeGen/non_affine_float_compare.ll b/polly/test/CodeGen/non_affine_float_compare.ll
index a4e1a5b556a9..be310b5bf5ca 100644
--- a/polly/test/CodeGen/non_affine_float_compare.ll
+++ b/polly/test/CodeGen/non_affine_float_compare.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen \
+; RUN: opt %loadPolly -polly-codegen \
; RUN: -polly-allow-nonaffine-branches -S -verify-dom-info \
; RUN: < %s | FileCheck %s
;
@@ -11,35 +11,39 @@
;
;
; CHECK: polly.stmt.bb2:
-; CHECK: %scevgep[[R0:[0-9]*]] = getelementptr float, float* %A, i64 %polly.indvar
-; CHECK: %tmp3_p_scalar_ = load float, float* %scevgep[[R0]], align 4, !alias.scope !0, !noalias !3
-; CHECK: %scevgep[[R2:[0-9]*]] = getelementptr float, float* %scevgep{{[0-9]*}}, i64 %polly.indvar
-; CHECK: %tmp6_p_scalar_ = load float, float* %scevgep[[R2]], align 4, !alias.scope !0, !noalias !3
+; CHECK: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK: %scevgep[[R0:[0-9]*]] = getelementptr i8, ptr %A, i64 %[[offset]]
+; CHECK: %tmp3_p_scalar_ = load float, ptr %scevgep[[R0]], align 4, !alias.scope !0, !noalias !3
+; CHECK: %[[offset2:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK: %scevgep[[R2:[0-9]*]] = getelementptr i8, ptr %scevgep{{[0-9]*}}, i64 %[[offset2]]
+; CHECK: %tmp6_p_scalar_ = load float, ptr %scevgep[[R2]], align 4, !alias.scope !0, !noalias !3
; CHECK: %p_tmp7 = fcmp oeq float %tmp3_p_scalar_, %tmp6_p_scalar_
; CHECK: br i1 %p_tmp7, label %polly.stmt.bb8, label %polly.stmt.bb12.[[R:[a-zA-Z_.0-9]*]]
; CHECK: polly.stmt.bb8:
-; CHECK: %scevgep[[R3:[0-9]*]] = getelementptr float, float* %A, i64 %polly.indvar
-; CHECK: %tmp10_p_scalar_ = load float, float* %scevgep[[R3]], align 4, !alias.scope !0, !noalias !3
+; CHECK: %[[offset3:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK: %scevgep[[R3:[0-9]*]] = getelementptr i8, ptr %A, i64 %[[offset3]]
+; CHECK: %tmp10_p_scalar_ = load float, ptr %scevgep[[R3]], align 4, !alias.scope !0, !noalias !3
; CHECK: %p_tmp11 = fadd float %tmp10_p_scalar_, 1.000000e+00
-; CHECK: store float %p_tmp11, float* %scevgep[[R3]], align 4, !alias.scope !0, !noalias !3
+; CHECK: store float %p_tmp11, ptr %scevgep[[R3]], align 4, !alias.scope !0, !noalias !3
; CHECK: br label %polly.stmt.bb12.[[R]]
; CHECK: polly.stmt.bb12.[[R]]:
; CHECK: br label %polly.stmt.bb12
; CHECK: polly.stmt.bb12:
-; CHECK: %scevgep[[R4:[0-9]*]] = getelementptr float, float* %A, i64 %polly.indvar
-; CHECK: %tmp10b_p_scalar_ = load float, float* %scevgep[[R4]], align 4, !alias.scope !0, !noalias !3
+; CHECK: %[[offset4:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK: %scevgep[[R4:[0-9]*]] = getelementptr i8, ptr %A, i64 %[[offset4]]
+; CHECK: %tmp10b_p_scalar_ = load float, ptr %scevgep[[R4]], align 4, !alias.scope !0, !noalias !3
; CHECK: %p_tmp11b = fadd float %tmp10b_p_scalar_, 1.000000e+00
-; CHECK: store float %p_tmp11b, float* %scevgep[[R4]], align 4, !alias.scope !0, !noalias !3
+; CHECK: store float %p_tmp11b, ptr %scevgep[[R4]], align 4, !alias.scope !0, !noalias !3
; CHECK: %polly.indvar_next = add nsw i64 %polly.indvar, 1
; CHECK: %polly.loop_cond = icmp sle i64 %polly.indvar_next, 1023
; CHECK: br i1 %polly.loop_cond, label %polly.loop_header, label %polly.loop_exit
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(float* %A) {
+define void @f(ptr %A) {
bb:
br label %bb1
@@ -49,26 +53,26 @@ bb1: ; preds = %bb13, %bb
br i1 %exitcond, label %bb2, label %bb14
bb2: ; preds = %bb1
- %tmp = getelementptr inbounds float, float* %A, i64 %indvars.iv
- %tmp3 = load float, float* %tmp, align 4
+ %tmp = getelementptr inbounds float, ptr %A, i64 %indvars.iv
+ %tmp3 = load float, ptr %tmp, align 4
%tmp4 = add nsw i64 %indvars.iv, -1
- %tmp5 = getelementptr inbounds float, float* %A, i64 %tmp4
- %tmp6 = load float, float* %tmp5, align 4
+ %tmp5 = getelementptr inbounds float, ptr %A, i64 %tmp4
+ %tmp6 = load float, ptr %tmp5, align 4
%tmp7 = fcmp oeq float %tmp3, %tmp6
br i1 %tmp7, label %bb8, label %bb12
bb8: ; preds = %bb2
- %tmp9 = getelementptr inbounds float, float* %A, i64 %indvars.iv
- %tmp10 = load float, float* %tmp9, align 4
+ %tmp9 = getelementptr inbounds float, ptr %A, i64 %indvars.iv
+ %tmp10 = load float, ptr %tmp9, align 4
%tmp11 = fadd float %tmp10, 1.000000e+00
- store float %tmp11, float* %tmp9, align 4
+ store float %tmp11, ptr %tmp9, align 4
br label %bb12
bb12: ; preds = %bb8, %bb2
- %tmp9b = getelementptr inbounds float, float* %A, i64 %indvars.iv
- %tmp10b = load float, float* %tmp9b, align 4
+ %tmp9b = getelementptr inbounds float, ptr %A, i64 %indvars.iv
+ %tmp10b = load float, ptr %tmp9b, align 4
%tmp11b = fadd float %tmp10b, 1.000000e+00
- store float %tmp11b, float* %tmp9b, align 4
+ store float %tmp11b, ptr %tmp9b, align 4
br label %bb13
bb13: ; preds = %bb12
diff --git a/polly/test/CodeGen/partial_write_array.ll b/polly/test/CodeGen/partial_write_array.ll
index 6305f512a32b..6dc5550d82af 100644
--- a/polly/test/CodeGen/partial_write_array.ll
+++ b/polly/test/CodeGen/partial_write_array.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
;
; Partial write of an array access.
;
@@ -6,7 +6,7 @@
; A[0] = 42.0
;
-define void @partial_write_array(i32 %n, double* noalias nonnull %A) {
+define void @partial_write_array(i32 %n, ptr noalias nonnull %A) {
entry:
br label %for
@@ -16,7 +16,7 @@ for:
br i1 %j.cmp, label %body, label %exit
body:
- store double 42.0, double* %A
+ store double 42.0, ptr %A
br label %inc
inc:
@@ -37,8 +37,8 @@ return:
; CHECK-NEXT: br i1 %polly.Stmt_body_Write0.cond, label %polly.stmt.body.Stmt_body_Write0.partial, label %polly.stmt.body.cont
; CHECK: polly.stmt.body.Stmt_body_Write0.partial:
-; CHECK-NEXT: %polly.access.A = getelementptr double, double* %A, i64 0
-; CHECK-NEXT: store double 4.200000e+01, double* %polly.access.A, align 8, !alias.scope !0, !noalias !3
+; CHECK-NEXT: %polly.access.A = getelementptr double, ptr %A, i64 0
+; CHECK-NEXT: store double 4.200000e+01, ptr %polly.access.A, align 8, !alias.scope !0, !noalias !3
; CHECK-NEXT: br label %polly.stmt.body.cont
; CHECK: polly.stmt.body.cont:
diff --git a/polly/test/CodeGen/partial_write_full_write_that_appears_partial.ll b/polly/test/CodeGen/partial_write_full_write_that_appears_partial.ll
index 8c1d18c6ac63..18a809b30557 100644
--- a/polly/test/CodeGen/partial_write_full_write_that_appears_partial.ll
+++ b/polly/test/CodeGen/partial_write_full_write_that_appears_partial.ll
@@ -1,9 +1,7 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
; CHECK: polly.stmt.if.then81: ; preds = %polly.stmt.if.end75
-; CHECK-NEXT: %scevgep = getelementptr [2 x %S], [2 x %S]* %tmp, i64 0, i64 %.147
-; CHECK-NEXT: %scevgep1 = bitcast %S* %scevgep to float*
-; CHECK-NEXT: store float undef, float* %scevgep1, align 4, !alias.scope !0, !noalias !3
+; CHECK-NEXT: store float undef, ptr %fX64, align 4, !alias.scope !0, !noalias !3
; CHECK-NEXT: br label %polly.stmt.if.end87.region_exiting
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
@@ -17,7 +15,7 @@ entry:
%cmp52 = fcmp olt float undef, undef
%not.cmp52 = xor i1 %cmp52, true
%.147 = zext i1 %not.cmp52 to i64
- %fX64 = getelementptr inbounds [2 x %S], [2 x %S]* %tmp, i64 0, i64 %.147, i32 0
+ %fX64 = getelementptr inbounds [2 x %S], ptr %tmp, i64 0, i64 %.147, i32 0
br label %if.end75
if.end75:
@@ -25,7 +23,7 @@ if.end75:
br i1 %cmp80, label %if.then81, label %if.end87
if.then81:
- store float undef, float* %fX64, align 4
+ store float undef, ptr %fX64, align 4
br label %if.end87
if.end87:
diff --git a/polly/test/CodeGen/partial_write_impossible_restriction.ll b/polly/test/CodeGen/partial_write_impossible_restriction.ll
index 58afd0b6afdb..178227fef8e5 100644
--- a/polly/test/CodeGen/partial_write_impossible_restriction.ll
+++ b/polly/test/CodeGen/partial_write_impossible_restriction.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
;
; The isl scheduler isolates %cond.false into two instances.
; A partial write access in one of the instances was never executed,
@@ -7,7 +7,7 @@
;
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
-define void @partial_write_impossible_restriction(i32* %.pn) {
+define void @partial_write_impossible_restriction(ptr %.pn) {
entry:
br i1 undef, label %invoke.cont258, label %cond.true.i.i.i.i1007
@@ -18,8 +18,8 @@ invoke.cont258:
br label %invoke.cont274
invoke.cont274: ; preds = %invoke.cont258
- %tmp4 = load i32*, i32** undef
- %tmp5 = load i32, i32* undef
+ %tmp4 = load ptr, ptr undef
+ %tmp5 = load i32, ptr undef
%tmp6 = zext i32 %tmp5 to i64
%tmp7 = sext i32 %tmp5 to i64
br label %for.body344
@@ -31,14 +31,14 @@ for.body344: ; preds = %cond.end, %invoke.c
br i1 %cmp347, label %cond.end, label %cond.false
cond.false: ; preds = %for.body344
- %add.ptr.i1128 = getelementptr inbounds i32, i32* %tmp4, i64 %indvars.iv.next1603
- %cond.in.sroa.speculate.load.cond.false = load i32, i32* %add.ptr.i1128
+ %add.ptr.i1128 = getelementptr inbounds i32, ptr %tmp4, i64 %indvars.iv.next1603
+ %cond.in.sroa.speculate.load.cond.false = load i32, ptr %add.ptr.i1128
br label %cond.end
cond.end: ; preds = %cond.false, %for.body344
%cond.in.sroa.speculated = phi i32 [ %cond.in.sroa.speculate.load.cond.false, %cond.false ], [ undef, %for.body344 ]
- %add.ptr.i1132 = getelementptr inbounds i32, i32* %.pn, i64 %indvars.iv1602
- store i32 undef, i32* %add.ptr.i1132
+ %add.ptr.i1132 = getelementptr inbounds i32, ptr %.pn, i64 %indvars.iv1602
+ store i32 undef, ptr %add.ptr.i1132
%cmp342 = icmp slt i64 %indvars.iv.next1603, %tmp7
br i1 %cmp342, label %for.body344, label %if.then.i.i1141.loopexit
@@ -48,11 +48,11 @@ if.then.i.i1141.loopexit: ; preds = %cond.end
; CHECK-LABEL: polly.stmt.cond.false:
-; CHECK: %polly.access..pn{{[0-9]*}} = getelementptr i32, i32* %.pn, i64 %polly.indvar
-; CHECK: store i32 %cond.in.sroa.speculate.load.cond.false_p_scalar_, i32* %polly.access..pn{{[0-9]*}}, align 4, !alias.scope !0, !noalias !3
+; CHECK: %polly.access..pn{{[0-9]*}} = getelementptr i32, ptr %.pn, i64 %polly.indvar
+; CHECK: store i32 %cond.in.sroa.speculate.load.cond.false_p_scalar_, ptr %polly.access..pn{{[0-9]*}}, align 4, !alias.scope !0, !noalias !3
; CHECK: br label %polly.merge
; CHECK-LABEL: polly.stmt.cond.false{{[0-9]*}}:
-; CHECK: %polly.access..pn{{[0-9]*}} = getelementptr i32, i32* %.pn, i64 0
-; CHECK: store i32 %cond.in.sroa.speculate.load.cond.false_p_scalar_{{[0-9]*}}, i32* %polly.access..pn{{[0-9]*}}, align 4, !alias.scope !0, !noalias !3
+; CHECK: %polly.access..pn{{[0-9]*}} = getelementptr i32, ptr %.pn, i64 0
+; CHECK: store i32 %cond.in.sroa.speculate.load.cond.false_p_scalar_{{[0-9]*}}, ptr %polly.access..pn{{[0-9]*}}, align 4, !alias.scope !0, !noalias !3
; CHECK: br label %polly.stmt.cond.end{{[0-9]*}}
diff --git a/polly/test/CodeGen/partial_write_in_region.ll b/polly/test/CodeGen/partial_write_in_region.ll
index ce587a9583d1..d8f57b35d585 100644
--- a/polly/test/CodeGen/partial_write_in_region.ll
+++ b/polly/test/CodeGen/partial_write_in_region.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-import-jscop \
+; RUN: opt %loadPolly -polly-import-jscop \
; RUN: -polly-import-jscop-postfix=transformed -polly-codegen \
; RUN: -verify-dom-info \
; RUN: -S < %s | FileCheck %s
@@ -13,16 +13,17 @@
; }
; CHECK: polly.stmt.bb5: ; preds = %polly.stmt.bb2
-; CHECK-NEXT: %scevgep10 = getelementptr float, float* %B, i64 %polly.indvar
-; CHECK-NEXT: %tmp7_p_scalar_ = load float, float* %scevgep10
+; CHECK-NEXT: %[[offset:.*]] = shl nuw nsw i64 %polly.indvar, 2
+; CHECK-NEXT: %scevgep10 = getelementptr i8, ptr %B, i64 %[[offset]]
+; CHECK-NEXT: %tmp7_p_scalar_ = load float, ptr %scevgep10
; CHECK-NEXT: %p_tmp8 = fadd float %tmp7_p_scalar_, 1.000000e+00
-; CHECK-NEXT: %24 = icmp sle i64 %polly.indvar, 9
-; CHECK-NEXT: %polly.Stmt_bb2__TO__bb9_MayWrite2.cond = icmp ne i1 %24, false
+; CHECK-NEXT: %[[cmp:.*]] = icmp sle i64 %polly.indvar, 9
+; CHECK-NEXT: %polly.Stmt_bb2__TO__bb9_MayWrite2.cond = icmp ne i1 %[[cmp]], false
; CHECK-NEXT: br i1 %polly.Stmt_bb2__TO__bb9_MayWrite2.cond, label %polly.stmt.bb5.Stmt_bb2__TO__bb9_MayWrite2.partial, label %polly.stmt.bb5.cont
; CHECK: polly.stmt.bb5.Stmt_bb2__TO__bb9_MayWrite2.partial: ; preds = %polly.stmt.bb5
-; CHECK-NEXT: %polly.access.B11 = getelementptr float, float* %B, i64 %polly.indvar
-; CHECK-NEXT: store float %p_tmp8, float* %polly.access.B11
+; CHECK-NEXT: %polly.access.B11 = getelementptr float, ptr %B, i64 %polly.indvar
+; CHECK-NEXT: store float %p_tmp8, ptr %polly.access.B11
; CHECK-NEXT: br label %polly.stmt.bb5.cont
; CHECK: polly.stmt.bb5.cont: ; preds = %polly.stmt.bb5, %polly.stmt.bb5.Stmt_bb2__TO__bb9_MayWrite2.partial
@@ -30,7 +31,7 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @partial_write_in_region(i64* %A, float* %B, float* %C) {
+define void @partial_write_in_region(ptr %A, ptr %B, ptr %C) {
bb:
br label %bb1
@@ -40,20 +41,20 @@ bb1: ; preds = %bb10, %bb
br i1 %exitcond, label %bb2, label %bb12
bb2: ; preds = %bb1
- %tmp = getelementptr inbounds i64, i64* %A, i64 %i.0
- %tmp3 = load i64, i64* %tmp, align 8
+ %tmp = getelementptr inbounds i64, ptr %A, i64 %i.0
+ %tmp3 = load i64, ptr %tmp, align 8
%tmp4 = icmp eq i64 %tmp3, 0
br i1 %tmp4, label %bb9, label %bb5
bb5: ; preds = %bb2
- %tmp6 = getelementptr inbounds float, float* %B, i64 %i.0
- %tmp7 = load float, float* %tmp6, align 4
+ %tmp6 = getelementptr inbounds float, ptr %B, i64 %i.0
+ %tmp7 = load float, ptr %tmp6, align 4
%tmp8 = fadd float %tmp7, 1.000000e+00
- store float %tmp8, float* %tmp6, align 4
+ store float %tmp8, ptr %tmp6, align 4
br label %bb9b
bb9b:
- store float 42.0, float* %C
+ store float 42.0, ptr %C
br label %bb9
bb9: ; preds = %bb2, %bb5
diff --git a/polly/test/CodeGen/phi_conditional_simple_1.ll b/polly/test/CodeGen/phi_conditional_simple_1.ll
index 9def61a44094..f1b93b540f70 100644
--- a/polly/test/CodeGen/phi_conditional_simple_1.ll
+++ b/polly/test/CodeGen/phi_conditional_simple_1.ll
@@ -1,5 +1,5 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s --check-prefix=AST
-; RUN: opt -opaque-pointers=0 %loadPolly -S -polly-codegen < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s --check-prefix=AST
+; RUN: opt %loadPolly -S -polly-codegen < %s | FileCheck %s
;
; void jd(int *A, int c) {
; for (int i = 0; i < 1024; i++) {
@@ -21,19 +21,19 @@
; CHECK-LABEL: entry:
; CHECK-NEXT: %phi.phiops = alloca i32
; CHECK-LABEL: polly.stmt.if.end:
-; CHECK-NEXT: %phi.phiops.reload = load i32, i32* %phi.phiops
-; CHECK-NEXT: %scevgep
-; CHECK-NEXT: store i32 %phi.phiops.reload, i32*
+; CHECK-NEXT: %phi.phiops.reload = load i32, ptr %phi.phiops
+; CHECK: %scevgep
+; CHECK-NEXT: store i32 %phi.phiops.reload, ptr
; CHECK-LABEL: polly.stmt.if.then:
-; CHECK-NEXT: store i32 1, i32* %phi.phiops
+; CHECK-NEXT: store i32 1, ptr %phi.phiops
; CHECK-NEXT: br label %polly.merge{{[.]?}}
; CHECK-LABEL: polly.stmt.if.else:
-; CHECK-NEXT: store i32 2, i32* %phi.phiops
+; CHECK-NEXT: store i32 2, ptr %phi.phiops
; CHECK-NEXT: br label %polly.merge{{[.]?}}
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @jd(i32* %A, i32 %c) {
+define void @jd(ptr %A, i32 %c) {
entry:
br label %for.cond
@@ -54,8 +54,8 @@ if.else:
if.end:
%phi = phi i32 [ 1, %if.then], [ 2, %if.else ]
- %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- store i32 %phi, i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ store i32 %phi, ptr %arrayidx, align 4
br label %for.inc
for.inc:
diff --git a/polly/test/CodeGen/phi_loop_carried_float.ll b/polly/test/CodeGen/phi_loop_carried_float.ll
index 2e437bc38fff..ca1870fb3a09 100644
--- a/polly/test/CodeGen/phi_loop_carried_float.ll
+++ b/polly/test/CodeGen/phi_loop_carried_float.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -S -polly-codegen < %s | FileCheck %s
+; RUN: opt %loadPolly -S -polly-codegen < %s | FileCheck %s
;
; float f(float *A, int N) {
; float tmp = 0;
@@ -17,29 +17,29 @@
; CHECK-NEXT: ret
; CHECK-LABEL: polly.start:
-; CHECK-NEXT: store float 0.000000e+00, float* %tmp.0.phiops
+; CHECK-NEXT: store float 0.000000e+00, ptr %tmp.0.phiops
; CHECK-NEXT: sext
; CHECK-LABEL: polly.exiting:
; CHECK-NEXT: br label %polly.merge_new_and_old
; CHECK-LABEL: polly.stmt.bb1{{[0-9]*}}:
-; CHECK-NEXT: %tmp.0.phiops.reload[[R1:[0-9]*]] = load float, float* %tmp.0.phiops
-; CHECK: store float %tmp.0.phiops.reload[[R1]], float* %tmp.0.s2a
+; CHECK-NEXT: %tmp.0.phiops.reload[[R1:[0-9]*]] = load float, ptr %tmp.0.phiops
+; CHECK: store float %tmp.0.phiops.reload[[R1]], ptr %tmp.0.s2a
; CHECK-LABEL: polly.stmt.bb4:
-; CHECK: %tmp.0.s2a.reload[[R3:[0-9]*]] = load float, float* %tmp.0.s2a
-; CHECK: %tmp[[R5:[0-9]*]]_p_scalar_ = load float, float* %scevgep, align 4, !alias.scope !0, !noalias !3
+; CHECK: %tmp.0.s2a.reload[[R3:[0-9]*]] = load float, ptr %tmp.0.s2a
+; CHECK: %tmp[[R5:[0-9]*]]_p_scalar_ = load float, ptr %scevgep, align 4, !alias.scope !0, !noalias !3
; CHECK: %p_tmp[[R4:[0-9]*]] = fadd float %tmp.0.s2a.reload[[R3]], %tmp[[R5]]_p_scalar_
-; CHECK: store float %p_tmp[[R4]], float* %tmp.0.phiops
+; CHECK: store float %p_tmp[[R4]], ptr %tmp.0.phiops
; CHECK-LABEL: polly.stmt.bb1{{[0-9]*}}:
-; CHECK-NEXT: %tmp.0.phiops.reload[[R2:[0-9]*]] = load float, float* %tmp.0.phiops
-; CHECK: store float %tmp.0.phiops.reload[[R2]], float* %tmp.0.s2a
+; CHECK-NEXT: %tmp.0.phiops.reload[[R2:[0-9]*]] = load float, ptr %tmp.0.phiops
+; CHECK: store float %tmp.0.phiops.reload[[R2]], ptr %tmp.0.s2a
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(float* %A, i32 %N) {
+define void @f(ptr %A, i32 %N) {
bb:
%tmp = sext i32 %N to i64
br label %bb1
@@ -54,8 +54,8 @@ bb3: ; preds = %bb1
br label %bb4
bb4: ; preds = %bb3
- %tmp5 = getelementptr inbounds float, float* %A, i64 %indvars.iv
- %tmp6 = load float, float* %tmp5, align 4
+ %tmp5 = getelementptr inbounds float, ptr %A, i64 %indvars.iv
+ %tmp6 = load float, ptr %tmp5, align 4
%tmp7 = fadd float %tmp.0, %tmp6
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
br label %bb1
diff --git a/polly/test/CodeGen/phi_loop_carried_float_escape.ll b/polly/test/CodeGen/phi_loop_carried_float_escape.ll
index f3e8ed453e16..3b2ed01863b1 100644
--- a/polly/test/CodeGen/phi_loop_carried_float_escape.ll
+++ b/polly/test/CodeGen/phi_loop_carried_float_escape.ll
@@ -1,7 +1,7 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -S \
+; RUN: opt %loadPolly -S \
; RUN: -polly-analyze-read-only-scalars=false -polly-codegen < %s | FileCheck %s
-; RUN: opt -opaque-pointers=0 %loadPolly -S \
+; RUN: opt %loadPolly -S \
; RUN: -polly-analyze-read-only-scalars=true -polly-codegen < %s | FileCheck %s
;
; float f(float *A, int N) {
@@ -16,30 +16,30 @@
; CHECK-NEXT: br label %exit
; CHECK-LABEL: polly.start:
-; CHECK-NEXT: store float 0.000000e+00, float* %tmp.0.phiops
+; CHECK-NEXT: store float 0.000000e+00, ptr %tmp.0.phiops
; CHECK-NEXT: sext
; CHECK-LABEL: polly.exiting:
-; CHECK-NEXT: %tmp.0.final_reload = load float, float* %tmp.0.s2a
+; CHECK-NEXT: %tmp.0.final_reload = load float, ptr %tmp.0.s2a
; CHECK-NEXT: br label %polly.merge_new_and_old
; CHECK-LABEL: polly.stmt.bb1{{[0-9]*}}:
-; CHECK-NEXT: %tmp.0.phiops.reload[[R1:[0-9]*]] = load float, float* %tmp.0.phiops
-; CHECK-: store float %tmp.0.phiops.reload[[R1]], float* %tmp.0.s2a
+; CHECK-NEXT: %tmp.0.phiops.reload[[R1:[0-9]*]] = load float, ptr %tmp.0.phiops
+; CHECK-: store float %tmp.0.phiops.reload[[R1]], ptr %tmp.0.s2a
; CHECK-LABEL: polly.stmt.bb4:
-; CHECK: %tmp.0.s2a.reload[[R3:[0-9]*]] = load float, float* %tmp.0.s2a
-; CHECK: %tmp[[R5:[0-9]*]]_p_scalar_ = load float, float* %scevgep, align 4, !alias.scope !0, !noalias !3
+; CHECK: %tmp.0.s2a.reload[[R3:[0-9]*]] = load float, ptr %tmp.0.s2a
+; CHECK: %tmp[[R5:[0-9]*]]_p_scalar_ = load float, ptr %scevgep, align 4, !alias.scope !0, !noalias !3
; CHECK: %p_tmp[[R4:[0-9]*]] = fadd float %tmp.0.s2a.reload[[R3]], %tmp[[R5]]_p_scalar_
-; CHECK: store float %p_tmp[[R4]], float* %tmp.0.phiops
+; CHECK: store float %p_tmp[[R4]], ptr %tmp.0.phiops
; CHECK-LABEL: polly.stmt.bb1{{[0-9]*}}:
-; CHECK-NEXT: %tmp.0.phiops.reload[[R2:[0-9]*]] = load float, float* %tmp.0.phiops
-; CHECK: store float %tmp.0.phiops.reload[[R2]], float* %tmp.0.s2a
+; CHECK-NEXT: %tmp.0.phiops.reload[[R2:[0-9]*]] = load float, ptr %tmp.0.phiops
+; CHECK: store float %tmp.0.phiops.reload[[R2]], ptr %tmp.0.s2a
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define float @f(float* %A, i32 %N) {
+define float @f(ptr %A, i32 %N) {
bb:
%tmp = sext i32 %N to i64
br label %bb1
@@ -54,8 +54,8 @@ bb3: ; preds = %bb1
br label %bb4
bb4: ; preds = %bb3
- %tmp5 = getelementptr inbounds float, float* %A, i64 %indvars.iv
- %tmp6 = load float, float* %tmp5, align 4
+ %tmp5 = getelementptr inbounds float, ptr %A, i64 %indvars.iv
+ %tmp6 = load float, ptr %tmp5, align 4
%tmp7 = fadd float %tmp.0, %tmp6
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
br label %bb1
diff --git a/polly/test/CodeGen/region-with-instructions.ll b/polly/test/CodeGen/region-with-instructions.ll
index 02c0dfe05fc0..28cabefbf68b 100644
--- a/polly/test/CodeGen/region-with-instructions.ll
+++ b/polly/test/CodeGen/region-with-instructions.ll
@@ -1,16 +1,17 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
; CHECK-LABEL: polly.stmt.bb48:
-; CHECK-NEXT: %scevgep = getelementptr i64, i64* %A, i64 %polly.indvar
-; CHECK-NEXT: %tmp51_p_scalar_ = load i64, i64* %scevgep,
+; CHECK-NEXT: %[[offset:.*]] = shl i64 %polly.indvar, 3
+; CHECK-NEXT: %scevgep = getelementptr i8, ptr %A, i64 %[[offset]]
+; CHECK-NEXT: %tmp51_p_scalar_ = load i64, ptr %scevgep,
; CHECK-NEXT: %p_tmp52 = and i64 %tmp51_p_scalar_, %tmp26
; CHECK-NEXT: %p_tmp53 = icmp eq i64 %p_tmp52, %tmp26
-; CHECK-NEXT: store i64 42, i64* %scevgep, align 8
+; CHECK-NEXT: store i64 42, ptr %scevgep, align 8
; CHECK-NEXT: br i1 %p_tmp53, label %polly.stmt.bb54, label %polly.stmt.bb56.exit
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @quux(i32 %arg, i32 %arg1, i64* %A, i64 %tmp9, i64 %tmp24, i64 %tmp14, i64 %tmp22, i64 %tmp44) {
+define void @quux(i32 %arg, i32 %arg1, ptr %A, i64 %tmp9, i64 %tmp24, i64 %tmp14, i64 %tmp22, i64 %tmp44) {
bb:
%tmp26 = or i64 %tmp22, %tmp24
br label %bb39
@@ -25,16 +26,16 @@ bb46: ; preds = %bb39
bb48: ; preds = %bb56, %bb46
%tmp49 = phi i64 [ 0, %bb46 ], [ %tmp57, %bb56 ]
- %tmp50 = getelementptr inbounds i64, i64* %A, i64 %tmp49
- %tmp51 = load i64, i64* %tmp50, align 8
+ %tmp50 = getelementptr inbounds i64, ptr %A, i64 %tmp49
+ %tmp51 = load i64, ptr %tmp50, align 8
%tmp52 = and i64 %tmp51, %tmp26
%tmp53 = icmp eq i64 %tmp52, %tmp26
- store i64 42, i64* %tmp50, align 8
+ store i64 42, ptr %tmp50, align 8
br i1 %tmp53, label %bb54, label %bb56
bb54: ; preds = %bb48
%tmp55 = xor i64 %tmp51, %tmp47
- store i64 %tmp55, i64* %tmp50, align 8
+ store i64 %tmp55, ptr %tmp50, align 8
br label %bb56
bb56: ; preds = %bb54, %bb48
diff --git a/polly/test/CodeGen/scev-backedgetaken.ll b/polly/test/CodeGen/scev-backedgetaken.ll
index 43ebe1d1cf11..15e12ee8b451 100644
--- a/polly/test/CodeGen/scev-backedgetaken.ll
+++ b/polly/test/CodeGen/scev-backedgetaken.ll
@@ -1,11 +1,11 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
; llvm.org/PR48422
; Use of ScalarEvolution in Codegen not possible because DominatorTree is not updated.
;
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-define dso_local void @func(i1 %b, i1 %p3, [14 x i32]* %d) local_unnamed_addr {
+define dso_local void @func(i1 %b, i1 %p3, ptr %d) local_unnamed_addr {
entry:
%conv = zext i1 %b to i16
%add = select i1 %p3, i32 21, i32 20
@@ -17,13 +17,13 @@ for.body.us.us:
br i1 %b, label %omp.inner.for.body.us.us.us.preheader, label %omp.inner.for.body.us63.us.preheader
omp.inner.for.body.us63.us.preheader:
- %arrayidx25.us.le71.us = getelementptr inbounds [14 x i32], [14 x i32]* %d, i64 %idxprom.us.us, i64 0
- %0 = load i32, i32* %arrayidx25.us.le71.us, align 4
+ %arrayidx25.us.le71.us = getelementptr inbounds [14 x i32], ptr %d, i64 %idxprom.us.us, i64 0
+ %0 = load i32, ptr %arrayidx25.us.le71.us, align 4
br label %omp.inner.for.cond.simd.if.end.loopexit_crit_edge.us.us
omp.inner.for.body.us.us.us.preheader:
- %arrayidx25.us.le.us.us = getelementptr inbounds [14 x i32], [14 x i32]* %d, i64 %idxprom.us.us, i64 0
- %1 = load i32, i32* %arrayidx25.us.le.us.us, align 4
+ %arrayidx25.us.le.us.us = getelementptr inbounds [14 x i32], ptr %d, i64 %idxprom.us.us, i64 0
+ %1 = load i32, ptr %arrayidx25.us.le.us.us, align 4
%conv27.us.le.us.us = select i1 undef, i16 0, i16 undef
br label %omp.inner.for.cond.simd.if.end.loopexit_crit_edge.us.us
@@ -41,7 +41,7 @@ for.cond.cleanup.loopexit:
; CHECK-LABEL: @func(
; CHECK: polly.stmt.omp.inner.for.body.us.us.us.preheader:
-; CHECK: load i32, i32* %scevgep, align 4, !alias.scope !0, !noalias !3
+; CHECK: load i32, ptr %scevgep, align 4, !alias.scope !0, !noalias !3
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"polly.alias.scope.MemRef_d"}
diff --git a/polly/test/CodeGen/scev_expansion_in_nonaffine.ll b/polly/test/CodeGen/scev_expansion_in_nonaffine.ll
index 4356f309bae6..f61f21d4adb8 100644
--- a/polly/test/CodeGen/scev_expansion_in_nonaffine.ll
+++ b/polly/test/CodeGen/scev_expansion_in_nonaffine.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S \
+; RUN: opt %loadPolly -polly-codegen -S \
; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s
; bugpoint-reduced testcase of MiBench/consumer-lame/quantize-pvt.c from the
@@ -9,43 +9,43 @@
; whole subregion.
; CHECK-LABEL: polly.stmt.if.then.110:
-; CHECK: %[[R1_1:[0-9]*]] = mul nuw nsw i64 %polly.indvar[[R0_1:[0-9]*]], 30
-; CHECK: %scevgep[[R1_2:[0-9]*]] = getelementptr i32, i32* %scevgep{{[0-9]*}}, i64 %[[R1_1]]
-; CHECK: store i32 0, i32* %scevgep[[R1_2]], align 8
+; CHECK: %[[R1_1:[0-9]*]] = mul nuw nsw i64 %polly.indvar[[R0_1:[0-9]*]], 120
+; CHECK: %scevgep[[R1_2:[0-9]*]] = getelementptr i8, ptr %scevgep{{[0-9]*}}, i64 %[[R1_1]]
+; CHECK: store i32 0, ptr %scevgep[[R1_2]], align 8
; CHECK-LABEL: polly.stmt.if.else:
-; CHECK: %[[R2_1:[0-9]*]] = mul nuw nsw i64 %polly.indvar[[R0_1]], 30
-; CHECK: %scevgep[[R2_2:[0-9]*]] = getelementptr i32, i32* %scevgep{{[0-9]*}}, i64 %[[R2_1]]
-; CHECK: store i32 21, i32* %scevgep[[R2_2]], align 8
+; CHECK: %[[R2_1:[0-9]*]] = mul nuw nsw i64 %polly.indvar[[R0_1]], 120
+; CHECK: %scevgep[[R2_2:[0-9]*]] = getelementptr i8, ptr %scevgep{{[0-9]*}}, i64 %[[R2_1]]
+; CHECK: store i32 21, ptr %scevgep[[R2_2]], align 8
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-%struct.gr_info.4.59.136.224.290 = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, [4 x i32] }
+%struct.gr_info.4.59.136.224.290 = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, [4 x i32] }
%struct.gr_info_ss.5.60.137.225.291 = type { %struct.gr_info.4.59.136.224.290 }
%struct.anon.6.61.138.226.292 = type { [2 x %struct.gr_info_ss.5.60.137.225.291] }
%struct.III_side_info_t.7.62.139.227.293 = type { i32, i32, i32, [2 x [4 x i32]], [2 x %struct.anon.6.61.138.226.292] }
-%struct.lame_global_flags.3.58.135.223.289 = type { i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, float, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 }
+%struct.lame_global_flags.3.58.135.223.289 = type { i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, float, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 }
@convert_mdct = external global i32, align 4
@reduce_sidechannel = external global i32, align 4
; Function Attrs: nounwind uwtable
-define void @iteration_init(%struct.lame_global_flags.3.58.135.223.289* %gfp, %struct.III_side_info_t.7.62.139.227.293* %l3_side, [2 x [576 x i32]]* %l3_enc) #0 {
+define void @iteration_init(ptr %gfp, ptr %l3_side, ptr %l3_enc) #0 {
entry:
- %resvDrain = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, %struct.III_side_info_t.7.62.139.227.293* %l3_side, i64 0, i32 2
- store i32 0, i32* %resvDrain, align 8
- store i32 0, i32* @convert_mdct, align 4
- store i32 0, i32* @reduce_sidechannel, align 4
- %mode_gr = getelementptr inbounds %struct.lame_global_flags.3.58.135.223.289, %struct.lame_global_flags.3.58.135.223.289* %gfp, i64 0, i32 45
- %0 = load i32, i32* %mode_gr, align 8
+ %resvDrain = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, ptr %l3_side, i64 0, i32 2
+ store i32 0, ptr %resvDrain, align 8
+ store i32 0, ptr @convert_mdct, align 4
+ store i32 0, ptr @reduce_sidechannel, align 4
+ %mode_gr = getelementptr inbounds %struct.lame_global_flags.3.58.135.223.289, ptr %gfp, i64 0, i32 45
+ %0 = load i32, ptr %mode_gr, align 8
%cmp95.145 = icmp sgt i32 %0, 0
br i1 %cmp95.145, label %for.cond.98.preheader, label %for.cond.120.preheader
for.cond.98.preheader: ; preds = %for.inc.117, %entry
%indvars.iv157 = phi i64 [ %indvars.iv.next158, %for.inc.117 ], [ 0, %entry ]
- %stereo = getelementptr inbounds %struct.lame_global_flags.3.58.135.223.289, %struct.lame_global_flags.3.58.135.223.289* %gfp, i64 0, i32 46
- %1 = load i32, i32* %stereo, align 4
+ %stereo = getelementptr inbounds %struct.lame_global_flags.3.58.135.223.289, ptr %gfp, i64 0, i32 46
+ %1 = load i32, ptr %stereo, align 4
%cmp99.143 = icmp sgt i32 %1, 0
br i1 %cmp99.143, label %for.body.101, label %for.inc.117
@@ -54,34 +54,34 @@ for.cond.120.preheader: ; preds = %for.inc.117, %entry
for.body.101: ; preds = %for.inc.114, %for.cond.98.preheader
%indvars.iv155 = phi i64 [ %indvars.iv.next156, %for.inc.114 ], [ 0, %for.cond.98.preheader ]
- %block_type = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, %struct.III_side_info_t.7.62.139.227.293* %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 6
- %2 = load i32, i32* %block_type, align 8
+ %block_type = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, ptr %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 6
+ %2 = load i32, ptr %block_type, align 8
%cmp108 = icmp eq i32 %2, 2
- %sfb_lmax = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, %struct.III_side_info_t.7.62.139.227.293* %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 16
+ %sfb_lmax = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, ptr %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 16
br i1 %cmp108, label %if.then.110, label %if.else
if.then.110: ; preds = %for.body.101
- store i32 0, i32* %sfb_lmax, align 8
- %sfb_smax = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, %struct.III_side_info_t.7.62.139.227.293* %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 17
- store i32 0, i32* %sfb_smax, align 4
+ store i32 0, ptr %sfb_lmax, align 8
+ %sfb_smax = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, ptr %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 17
+ store i32 0, ptr %sfb_smax, align 4
br label %for.inc.114
if.else: ; preds = %for.body.101
- store i32 21, i32* %sfb_lmax, align 8
- %sfb_smax112 = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, %struct.III_side_info_t.7.62.139.227.293* %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 17
- store i32 12, i32* %sfb_smax112, align 4
+ store i32 21, ptr %sfb_lmax, align 8
+ %sfb_smax112 = getelementptr inbounds %struct.III_side_info_t.7.62.139.227.293, ptr %l3_side, i64 0, i32 4, i64 %indvars.iv157, i32 0, i64 %indvars.iv155, i32 0, i32 17
+ store i32 12, ptr %sfb_smax112, align 4
br label %for.inc.114
for.inc.114: ; preds = %if.else, %if.then.110
%indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
- %3 = load i32, i32* %stereo, align 4
+ %3 = load i32, ptr %stereo, align 4
%4 = sext i32 %3 to i64
%cmp99 = icmp slt i64 %indvars.iv.next156, %4
br i1 %cmp99, label %for.body.101, label %for.inc.117
for.inc.117: ; preds = %for.inc.114, %for.cond.98.preheader
%indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
- %5 = load i32, i32* %mode_gr, align 8
+ %5 = load i32, ptr %mode_gr, align 8
%6 = sext i32 %5 to i64
%cmp95 = icmp slt i64 %indvars.iv.next158, %6
br i1 %cmp95, label %for.cond.98.preheader, label %for.cond.120.preheader
diff --git a/polly/test/CodeGen/scev_looking_through_bitcasts.ll b/polly/test/CodeGen/scev_looking_through_bitcasts.ll
index 6a1603d862fc..c87d932479b7 100644
--- a/polly/test/CodeGen/scev_looking_through_bitcasts.ll
+++ b/polly/test/CodeGen/scev_looking_through_bitcasts.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
; Scalar write of bitcasted value. Instead of writing %b of type
; %structty, the SCEV expression looks through the bitcast such that
@@ -7,11 +7,11 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-%structty = type { %structty*, %structty*, i32, [2 x i64] }
+%structty = type { ptr, ptr, i32, [2 x i64] }
define void @bitmap_set_range() {
entry:
- %a = ptrtoint i8* undef to i64
+ %a = ptrtoint ptr undef to i64
br label %cond.end32.i
cond.end32.i:
@@ -21,19 +21,17 @@ cond.true67.i:
br label %cond.end73.i
cond.end73.i:
- %add.ptr81.i = getelementptr inbounds i8, i8* null, i64 %a
- %b = bitcast i8* %add.ptr81.i to %structty*
+ %add.ptr81.i = getelementptr inbounds i8, ptr null, i64 %a
br label %bitmap_element_allocate.exit
bitmap_element_allocate.exit:
- %tobool43 = icmp eq %structty* %b, null
+ %tobool43 = icmp eq ptr %add.ptr81.i, null
ret void
}
; CHECK: polly.stmt.cond.end73.i:
-; CHECK-NEXT: %scevgep = getelementptr i8, i8* null, i64 %a
-; CHECK-NEXT: %scevgep1 = bitcast i8* %scevgep to %structty*
-; CHECK-NEXT: store %structty* %scevgep1, %structty** %b.s2a, align 8
+; CHECK-NEXT: %scevgep = getelementptr i8, ptr null, i64 %a
+; CHECK-NEXT: store ptr %scevgep, ptr %add.ptr81.i.s2a, align 8
; CHECK-NEXT: br label %polly.exiting
diff --git a/polly/test/CodeGen/single_loop_param_less_equal.ll b/polly/test/CodeGen/single_loop_param_less_equal.ll
index c6e7b986c804..e63ee299a37c 100644
--- a/polly/test/CodeGen/single_loop_param_less_equal.ll
+++ b/polly/test/CodeGen/single_loop_param_less_equal.ll
@@ -1,6 +1,6 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen < %s | opt -opaque-pointers=0 -passes='print<loops>' -disable-output 2>&1 | FileCheck %s -check-prefix=LOOPS
+; RUN: opt %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
+; RUN: opt %loadPolly -polly-codegen < %s | opt -passes='print<loops>' -disable-output 2>&1 | FileCheck %s -check-prefix=LOOPS
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 i32] zeroinitializer
@@ -13,12 +13,12 @@ start:
loop.header:
%i = phi i64 [ 0, %start ], [ %i.next, %loop.backedge ]
- %scevgep = getelementptr [1024 x i32], [1024 x i32]* @A, i64 0, i64 %i
+ %scevgep = getelementptr [1024 x i32], ptr @A, i64 0, i64 %i
%exitcond = icmp ne i64 %i, %n_plus_one
br i1 %exitcond, label %loop.body, label %ret
loop.body:
- store i32 1, i32* %scevgep
+ store i32 1, ptr %scevgep
br label %loop.backedge
loop.backedge:
@@ -48,8 +48,9 @@ ret:
; CODEGEN: br label %polly.stmt.loop.body
; CODEGEN: polly.stmt.loop.body:
-; CODEGEN: [[PTR:%[a-zA-Z0-9_\.]+]] = getelementptr [1024 x i32], [1024 x i32]* @A, i64 0, i64 %polly.indvar
-; CODEGEN: store i32 1, i32* [[PTR]]
+; CODEGEN: %[[offset:.*]] = shl i64 %polly.indvar, 2
+; CODEGEN: [[PTR:%[a-zA-Z0-9_\.]+]] = getelementptr i8, ptr @A, i64 %[[offset]]
+; CODEGEN: store i32 1, ptr [[PTR]]
; CODEGEN: %polly.indvar_next = add nsw i64 %polly.indvar, 1
; CODEGEN: %polly.loop_cond = icmp sle i64 %polly.indvar_next, %n
; CODEGEN: br i1 %polly.loop_cond, label %polly.loop_header, label %polly.loop_exit
diff --git a/polly/test/CodeGen/single_loop_param_less_than.ll b/polly/test/CodeGen/single_loop_param_less_than.ll
index fcd79d0a1734..95130f926450 100644
--- a/polly/test/CodeGen/single_loop_param_less_than.ll
+++ b/polly/test/CodeGen/single_loop_param_less_than.ll
@@ -1,5 +1,5 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
+; RUN: opt %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
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 i32] zeroinitializer
@@ -11,12 +11,12 @@ start:
loop.header:
%i = phi i64 [ 0, %start ], [ %i.next, %loop.backedge ]
- %scevgep = getelementptr [1024 x i32], [1024 x i32]* @A, i64 0, i64 %i
+ %scevgep = getelementptr [1024 x i32], ptr @A, i64 0, i64 %i
%exitcond = icmp ne i64 %i, %n
br i1 %exitcond, label %loop.body, label %ret
loop.body:
- store i32 1, i32* %scevgep
+ store i32 1, ptr %scevgep
br label %loop.backedge
loop.backedge:
@@ -46,8 +46,9 @@ ret:
; CODEGEN: br label %polly.stmt.loop.body
; CODEGEN: polly.stmt.loop.body:
-; CODEGEN: [[PTR:%[a-zA-Z0-9_\.]+]] = getelementptr [1024 x i32], [1024 x i32]* @A, i64 0, i64 %polly.indvar
-; CODEGEN: store i32 1, i32* [[PTR]]
+; CODEGEN: %[[offset:.*]] = shl i64 %polly.indvar, 2
+; CODEGEN: [[PTR:%[a-zA-Z0-9_\.]+]] = getelementptr i8, ptr @A, i64 %[[offset]]
+; CODEGEN: store i32 1, ptr [[PTR]]
; CODEGEN: %polly.indvar_next = add nsw i64 %polly.indvar, 1
; CODEGEN: %polly.loop_cond = icmp slt i64 %polly.indvar_next, %n
; CODEGEN: br i1 %polly.loop_cond, label %polly.loop_header, label %polly.loop_exit
diff --git a/polly/test/CodeGen/stmt_split_no_dependence.ll b/polly/test/CodeGen/stmt_split_no_dependence.ll
index 5c6a0a362619..a395aa14b4c8 100644
--- a/polly/test/CodeGen/stmt_split_no_dependence.ll
+++ b/polly/test/CodeGen/stmt_split_no_dependence.ll
@@ -1,7 +1,7 @@
-; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
-; CHECK: store i32 %8, i32* %scevgep, align 4, !alias.scope !1, !noalias !4
-; CHECK: store i32 %9, i32* %scevgep4, align 4, !alias.scope !4, !noalias !1
+; CHECK: store i32 %9, ptr %scevgep, align 4, !alias.scope !1, !noalias !4
+; CHECK: store i32 %11, ptr %scevgep4, align 4, !alias.scope !4, !noalias !1
;
; void func(int *A, int *B){
; for (int i = 0; i < 1024; i+=1) {
@@ -12,7 +12,7 @@
; }
;
; Function Attrs: noinline nounwind uwtable
-define void @func(i32* %A, i32* %B) #0 {
+define void @func(ptr %A, ptr %B) #0 {
entry:
br label %for.cond
@@ -26,11 +26,11 @@ for.body: ; preds = %for.cond
Stmt: ; preds = %for.body
%idxprom = sext i32 %i.0 to i64
- %arrayidx = getelementptr inbounds i32, i32* %A, i64 %idxprom
- store i32 %i.0, i32* %arrayidx, align 4, !polly_split_after !0
+ %arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom
+ store i32 %i.0, ptr %arrayidx, align 4, !polly_split_after !0
%idxprom1 = sext i32 %i.0 to i64
- %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %idxprom1
- store i32 %i.0, i32* %arrayidx2, align 4
+ %arrayidx2 = getelementptr inbounds i32, ptr %B, i64 %idxprom1
+ store i32 %i.0, ptr %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %Stmt
diff --git a/polly/test/CodeGen/switch-in-non-affine-region.ll b/polly/test/CodeGen/switch-in-non-affine-region.ll
index d9e26efbca7e..8eeabd980846 100644
--- a/polly/test/CodeGen/switch-in-non-affine-region.ll
+++ b/polly/test/CodeGen/switch-in-non-affine-region.ll
@@ -1,4 +1,4 @@
-; RUN: opt -opaque-pointers=0 %loadPolly \
+; RUN: opt %loadPolly \
; RUN: -S -polly-codegen < %s | FileCheck %s
;
; void f(int *A, int N) {
@@ -15,8 +15,8 @@
; }
;
; CHECK: polly.stmt.if.then:
-; CHECK: %1 = trunc i64 %polly.indvar to i32
-; CHECK: %p_rem = srem i32 %1, 4
+; CHECK: %[[trunc:.*]] = trunc i64 %polly.indvar to i32
+; CHECK: %p_rem = srem i32 %[[trunc]], 4
; CHECK: switch i32 %p_rem, label %polly.stmt.sw.epilog [
; CHECK: i32 0, label %polly.stmt.sw.bb
; CHECK: i32 1, label %polly.stmt.sw.bb.3
@@ -24,7 +24,7 @@
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-define void @f(i32* %A, i32 %N) {
+define void @f(ptr %A, i32 %N) {
entry:
%tmp = sext i32 %N to i64
br label %for.cond
@@ -35,8 +35,8 @@ for.cond: ; preds = %for.inc, %entry
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
- %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp1 = load i32, i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp1 = load i32, ptr %arrayidx, align 4
%tobool = icmp eq i32 %tmp1, 0
br i1 %tobool, label %if.end, label %if.then
@@ -49,17 +49,17 @@ if.then: ; preds = %for.body
]
sw.bb: ; preds = %if.then
- %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp3 = load i32, i32* %arrayidx2, align 4
+ %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp3 = load i32, ptr %arrayidx2, align 4
%add = add nsw i32 %tmp3, 1
- store i32 %add, i32* %arrayidx2, align 4
+ store i32 %add, ptr %arrayidx2, align 4
br label %sw.epilog
sw.bb.3: ; preds = %if.then
- %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
- %tmp4 = load i32, i32* %arrayidx5, align 4
+ %arrayidx5 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
+ %tmp4 = load i32, ptr %arrayidx5, align 4
%add6 = add nsw i32 %tmp4, 2
- store i32 %add6, i32* %arrayidx5, align 4
+ store i32 %add6, ptr %arrayidx5, align 4
br label %sw.epilog
sw.epilog: ; preds = %sw.bb.3, %sw.bb, %if.then