[llvm] dfc4a95 - [LoopBoundSplit] Convert tests to opaque pointers (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 03:52:39 PST 2022
Author: Nikita Popov
Date: 2022-12-27T12:52:22+01:00
New Revision: dfc4a956f3df59287e0cf6652c0f72621aca6a6f
URL: https://github.com/llvm/llvm-project/commit/dfc4a956f3df59287e0cf6652c0f72621aca6a6f
DIFF: https://github.com/llvm/llvm-project/commit/dfc4a956f3df59287e0cf6652c0f72621aca6a6f.diff
LOG: [LoopBoundSplit] Convert tests to opaque pointers (NFC)
Added:
Modified:
llvm/test/Transforms/LoopBoundSplit/bug51866.ll
llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopBoundSplit/bug51866.ll b/llvm/test/Transforms/LoopBoundSplit/bug51866.ll
index 1d0d52f77d57a..dacea3366e480 100644
--- a/llvm/test/Transforms/LoopBoundSplit/bug51866.ll
+++ b/llvm/test/Transforms/LoopBoundSplit/bug51866.ll
@@ -18,8 +18,8 @@ define void @test() {
; CHECK-NEXT: br i1 [[EXITCOND_NOT]], label [[ENTRY_SPLIT_SPLIT:%.*]], label [[FOR_BODY:%.*]]
; CHECK: for.body:
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i16 [[I_0]], 5
-; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @B, i16 0, i16 [[I_0]]
-; CHECK-NEXT: [[TMP0:%.*]] = load i16, i16* [[ARRAYIDX]], align 1
+; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i16], ptr @B, i16 0, i16 [[I_0]]
+; CHECK-NEXT: [[TMP0:%.*]] = load i16, ptr [[ARRAYIDX]], align 1
; CHECK-NEXT: br i1 true, label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
; CHECK-NEXT: call void @foo(i16 [[TMP0]], i16 [[I_3]])
@@ -49,8 +49,8 @@ define void @test() {
; CHECK-NEXT: br i1 [[EXITCOND_NOT_SPLIT]], label [[FOR_END_LOOPEXIT:%.*]], label [[FOR_BODY_SPLIT:%.*]]
; CHECK: for.body.split:
; CHECK-NEXT: [[CMP1_SPLIT:%.*]] = icmp ult i16 [[I_0_SPLIT]], 5
-; CHECK-NEXT: [[ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @B, i16 0, i16 [[I_0_SPLIT]]
-; CHECK-NEXT: [[TMP2:%.*]] = load i16, i16* [[ARRAYIDX_SPLIT]], align 1
+; CHECK-NEXT: [[ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds [10 x i16], ptr @B, i16 0, i16 [[I_0_SPLIT]]
+; CHECK-NEXT: [[TMP2:%.*]] = load i16, ptr [[ARRAYIDX_SPLIT]], align 1
; CHECK-NEXT: br i1 false, label [[IF_THEN_SPLIT:%.*]], label [[IF_ELSE_SPLIT:%.*]]
; CHECK: if.else.split:
; CHECK-NEXT: call void @bar(i16 [[TMP2]], i16 [[I_3_SPLIT]])
@@ -80,8 +80,8 @@ for.cond: ; preds = %for.inc, %entry
for.body: ; preds = %for.cond
%cmp1 = icmp ult i16 %i.0, 5
- %arrayidx = getelementptr inbounds [10 x i16], [10 x i16]* @B, i16 0, i16 %i.0
- %0 = load i16, i16* %arrayidx, align 1
+ %arrayidx = getelementptr inbounds [10 x i16], ptr @B, i16 0, i16 %i.0
+ %0 = load i16, ptr %arrayidx, align 1
br i1 %cmp1, label %if.then, label %if.else
if.then: ; preds = %for.body
diff --git a/llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll b/llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll
index ce505f6ce5f03..433b0f051598e 100644
--- a/llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll
+++ b/llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll
@@ -3,7 +3,7 @@
; The transformation is failed with this test because we can not guarantee the
; split condition is always true in pre-loop after transformation.
-define void @variable_split_loop_bound_and_exit_cond_inc_with_sgt(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @variable_split_loop_bound_and_exit_cond_inc_with_sgt(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @variable_split_loop_bound_and_exit_cond_inc_with_sgt(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -12,10 +12,10 @@ define void @variable_split_loop_bound_and_exit_cond_inc_with_sgt(i64 %a, i64* n
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[A:%.*]]
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -35,10 +35,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -55,7 +55,7 @@ exit:
; The transformation works with this test because we can guarantee the split
; condition is always true in pre-loop after transformation.
-define void @umax_variable_split_loop_bound_and_exit_cond_inc_with_sgt(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @umax_variable_split_loop_bound_and_exit_cond_inc_with_sgt(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @umax_variable_split_loop_bound_and_exit_cond_inc_with_sgt(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: [[B:%.*]] = call i64 @llvm.umax.i64(i64 [[A:%.*]], i64 1)
@@ -69,10 +69,10 @@ define void @umax_variable_split_loop_bound_and_exit_cond_inc_with_sgt(i64 %a, i
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[B]]
; CHECK-NEXT: br i1 true, label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -93,10 +93,10 @@ define void @umax_variable_split_loop_bound_and_exit_cond_inc_with_sgt(i64 %a, i
; CHECK: if.else.split:
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: if.then.split:
-; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[SRC]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, i64* [[SRC_ARRAYIDX_SPLIT]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[DST]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: store i64 [[VAL_SPLIT]], i64* [[DST_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[SRC]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, ptr [[SRC_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[DST]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: store i64 [[VAL_SPLIT]], ptr [[DST_ARRAYIDX_SPLIT]], align 4
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: for.inc.split:
; CHECK-NEXT: [[INC_SPLIT]] = add nuw nsw i64 [[IV_SPLIT]], 1
@@ -117,10 +117,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -137,7 +137,7 @@ exit:
; The transformation works with this test because we can guarantee the split
; condition is always true in pre-loop after transformation.
-define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_inc_with_sgt(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP_PH_SPLIT:%.*]]
@@ -150,10 +150,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt(i64* noalias %
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 true, label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -174,10 +174,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt(i64* noalias %
; CHECK: if.else.split:
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: if.then.split:
-; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[SRC]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, i64* [[SRC_ARRAYIDX_SPLIT]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[DST]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: store i64 [[VAL_SPLIT]], i64* [[DST_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[SRC]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, ptr [[SRC_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[DST]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: store i64 [[VAL_SPLIT]], ptr [[DST_ARRAYIDX_SPLIT]], align 4
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: for.inc.split:
; CHECK-NEXT: [[INC_SPLIT]] = add nuw nsw i64 [[IV_SPLIT]], 1
@@ -197,10 +197,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -215,7 +215,7 @@ exit:
ret void
}
-define void @variable_split_loop_bound_and_exit_cond_inc_with_eq(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @variable_split_loop_bound_and_exit_cond_inc_with_eq(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @variable_split_loop_bound_and_exit_cond_inc_with_eq(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -224,10 +224,10 @@ define void @variable_split_loop_bound_and_exit_cond_inc_with_eq(i64 %a, i64* no
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[A:%.*]]
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -247,10 +247,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -265,7 +265,7 @@ exit:
ret void
}
-define void @constant_split_loop_bound_and_exit_cond_inc_with_eq(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_inc_with_eq(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_inc_with_eq(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP_PH_SPLIT:%.*]]
@@ -278,10 +278,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_eq(i64* noalias %s
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 true, label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -302,10 +302,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_eq(i64* noalias %s
; CHECK: if.else.split:
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: if.then.split:
-; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[SRC]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, i64* [[SRC_ARRAYIDX_SPLIT]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[DST]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: store i64 [[VAL_SPLIT]], i64* [[DST_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[SRC]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, ptr [[SRC_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[DST]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: store i64 [[VAL_SPLIT]], ptr [[DST_ARRAYIDX_SPLIT]], align 4
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: for.inc.split:
; CHECK-NEXT: [[INC_SPLIT]] = add nuw nsw i64 [[IV_SPLIT]], 1
@@ -325,10 +325,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -343,7 +343,7 @@ exit:
ret void
}
-define void @variable_split_loop_bound_and_exit_cond_inc_with_sge(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @variable_split_loop_bound_and_exit_cond_inc_with_sge(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @variable_split_loop_bound_and_exit_cond_inc_with_sge(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -352,10 +352,10 @@ define void @variable_split_loop_bound_and_exit_cond_inc_with_sge(i64 %a, i64* n
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[A:%.*]]
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -375,10 +375,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -393,7 +393,7 @@ exit:
ret void
}
-define void @constant_split_loop_bound_and_exit_cond_inc_with_sge(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_inc_with_sge(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_inc_with_sge(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP_PH_SPLIT:%.*]]
@@ -407,10 +407,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_sge(i64* noalias %
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 true, label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -431,10 +431,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_sge(i64* noalias %
; CHECK: if.else.split:
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: if.then.split:
-; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[SRC]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, i64* [[SRC_ARRAYIDX_SPLIT]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[DST]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: store i64 [[VAL_SPLIT]], i64* [[DST_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[SRC]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, ptr [[SRC_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[DST]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: store i64 [[VAL_SPLIT]], ptr [[DST_ARRAYIDX_SPLIT]], align 4
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: for.inc.split:
; CHECK-NEXT: [[INC_SPLIT]] = add nuw nsw i64 [[IV_SPLIT]], 1
@@ -454,10 +454,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -472,7 +472,7 @@ exit:
ret void
}
-define void @variable_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @variable_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @variable_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -481,10 +481,10 @@ define void @variable_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(i6
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[A:%.*]]
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -504,10 +504,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -522,7 +522,7 @@ exit:
ret void
}
-define void @constant_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP_PH_SPLIT:%.*]]
@@ -536,10 +536,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(i6
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 true, label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -560,10 +560,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_step_is_not_one(i6
; CHECK: if.else.split:
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: if.then.split:
-; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[SRC]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, i64* [[SRC_ARRAYIDX_SPLIT]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[DST]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: store i64 [[VAL_SPLIT]], i64* [[DST_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[SRC]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, ptr [[SRC_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[DST]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: store i64 [[VAL_SPLIT]], ptr [[DST_ARRAYIDX_SPLIT]], align 4
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: for.inc.split:
; CHECK-NEXT: [[INC_SPLIT]] = add nuw nsw i64 [[IV_SPLIT]], 2
@@ -583,10 +583,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
@@ -601,7 +601,7 @@ exit:
ret void
}
-define void @variable_split_loop_bound_and_exit_cond_inc_with_ne(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @variable_split_loop_bound_and_exit_cond_inc_with_ne(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @variable_split_loop_bound_and_exit_cond_inc_with_ne(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -610,10 +610,10 @@ define void @variable_split_loop_bound_and_exit_cond_inc_with_ne(i64 %a, i64* no
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[A:%.*]]
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[FOR_INC]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: for.inc:
; CHECK-NEXT: [[INC]] = add nuw nsw i64 [[IV]], 1
@@ -631,10 +631,10 @@ loop:
br i1 %cmp, label %if.then, label %for.inc
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
for.inc:
@@ -646,7 +646,7 @@ exit:
ret void
}
-define void @constant_split_loop_bound_and_exit_cond_inc_with_ne(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_inc_with_ne(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_inc_with_ne(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -655,10 +655,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_ne(i64* noalias %s
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[FOR_INC]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: for.inc:
; CHECK-NEXT: [[INC]] = add nuw nsw i64 [[IV]], 1
@@ -676,10 +676,10 @@ loop:
br i1 %cmp, label %if.then, label %for.inc
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
for.inc:
@@ -691,7 +691,7 @@ exit:
ret void
}
-define void @varialbe_split_loop_bound_and_exit_cond_dec_with_slt(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @varialbe_split_loop_bound_and_exit_cond_dec_with_slt(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @varialbe_split_loop_bound_and_exit_cond_dec_with_slt(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -700,10 +700,10 @@ define void @varialbe_split_loop_bound_and_exit_cond_dec_with_slt(i64 %a, i64* n
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[A:%.*]]
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[FOR_DEC]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_DEC]]
; CHECK: for.dec:
; CHECK-NEXT: [[DEC]] = sub nuw nsw i64 [[IV]], 1
@@ -721,10 +721,10 @@ loop:
br i1 %cmp, label %if.then, label %for.dec
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.dec
for.dec:
@@ -736,7 +736,7 @@ exit:
ret void
}
-define void @constant_split_loop_bound_and_exit_cond_dec_with_slt(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_dec_with_slt(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_dec_with_slt(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -745,10 +745,10 @@ define void @constant_split_loop_bound_and_exit_cond_dec_with_slt(i64* noalias %
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[FOR_DEC]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_DEC]]
; CHECK: for.dec:
; CHECK-NEXT: [[DEC]] = sub nuw nsw i64 [[IV]], 1
@@ -766,10 +766,10 @@ loop:
br i1 %cmp, label %if.then, label %for.dec
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.dec
for.dec:
@@ -781,7 +781,7 @@ exit:
ret void
}
-define void @variable_split_loop_bound_and_exit_cond_dec_with_sle(i64 %a, i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @variable_split_loop_bound_and_exit_cond_dec_with_sle(i64 %a, ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @variable_split_loop_bound_and_exit_cond_dec_with_sle(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -790,10 +790,10 @@ define void @variable_split_loop_bound_and_exit_cond_dec_with_sle(i64 %a, i64* n
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], [[A:%.*]]
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[FOR_DEC]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_DEC]]
; CHECK: for.dec:
; CHECK-NEXT: [[DEC]] = sub nuw nsw i64 [[IV]], 1
@@ -811,10 +811,10 @@ loop:
br i1 %cmp, label %if.then, label %for.dec
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.dec
for.dec:
@@ -826,7 +826,7 @@ exit:
ret void
}
-define void @constant_split_loop_bound_and_exit_cond_dec_with_sle(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_dec_with_sle(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_dec_with_sle(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP:%.*]]
@@ -835,10 +835,10 @@ define void @constant_split_loop_bound_and_exit_cond_dec_with_sle(i64* noalias %
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[FOR_DEC]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_DEC]]
; CHECK: for.dec:
; CHECK-NEXT: [[DEC]] = sub nuw nsw i64 [[IV]], 1
@@ -856,10 +856,10 @@ loop:
br i1 %cmp, label %if.then, label %for.dec
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.dec
for.dec:
@@ -872,7 +872,7 @@ exit:
}
; LoopBoundSplit pass should ignore phi which is not scevable phi.
-define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt_and_is_not_scevable_phi(i64* noalias %src, i64* noalias %dst, i64 %n) {
+define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt_and_is_not_scevable_phi(ptr noalias %src, ptr noalias %dst, i64 %n) {
; CHECK-LABEL: @constant_split_loop_bound_and_exit_cond_inc_with_sgt_and_is_not_scevable_phi(
; CHECK-NEXT: loop.ph:
; CHECK-NEXT: br label [[LOOP_PH_SPLIT:%.*]]
@@ -886,10 +886,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt_and_is_not_sce
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[IV]], 10
; CHECK-NEXT: br i1 true, label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
-; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[SRC:%.*]], i64 [[IV]]
-; CHECK-NEXT: [[VAL:%.*]] = load i64, i64* [[SRC_ARRAYIDX]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, i64* [[DST:%.*]], i64 [[IV]]
-; CHECK-NEXT: store i64 [[VAL]], i64* [[DST_ARRAYIDX]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[SRC:%.*]], i64 [[IV]]
+; CHECK-NEXT: [[VAL:%.*]] = load i64, ptr [[SRC_ARRAYIDX]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX:%.*]] = getelementptr inbounds i64, ptr [[DST:%.*]], i64 [[IV]]
+; CHECK-NEXT: store i64 [[VAL]], ptr [[DST_ARRAYIDX]], align 4
; CHECK-NEXT: br label [[FOR_INC]]
; CHECK: if.else:
; CHECK-NEXT: br label [[FOR_INC]]
@@ -912,10 +912,10 @@ define void @constant_split_loop_bound_and_exit_cond_inc_with_sgt_and_is_not_sce
; CHECK: if.else.split:
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: if.then.split:
-; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[SRC]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, i64* [[SRC_ARRAYIDX_SPLIT]], align 4
-; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, i64* [[DST]], i64 [[IV_SPLIT]]
-; CHECK-NEXT: store i64 [[VAL_SPLIT]], i64* [[DST_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[SRC_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[SRC]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: [[VAL_SPLIT:%.*]] = load i64, ptr [[SRC_ARRAYIDX_SPLIT]], align 4
+; CHECK-NEXT: [[DST_ARRAYIDX_SPLIT:%.*]] = getelementptr inbounds i64, ptr [[DST]], i64 [[IV_SPLIT]]
+; CHECK-NEXT: store i64 [[VAL_SPLIT]], ptr [[DST_ARRAYIDX_SPLIT]], align 4
; CHECK-NEXT: br label [[FOR_INC_SPLIT]]
; CHECK: for.inc.split:
; CHECK-NEXT: [[INC_SPLIT]] = add nuw nsw i64 [[IV_SPLIT]], 1
@@ -936,10 +936,10 @@ loop:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %src.arrayidx = getelementptr inbounds i64, i64* %src, i64 %iv
- %val = load i64, i64* %src.arrayidx
- %dst.arrayidx = getelementptr inbounds i64, i64* %dst, i64 %iv
- store i64 %val, i64* %dst.arrayidx
+ %src.arrayidx = getelementptr inbounds i64, ptr %src, i64 %iv
+ %val = load i64, ptr %src.arrayidx
+ %dst.arrayidx = getelementptr inbounds i64, ptr %dst, i64 %iv
+ store i64 %val, ptr %dst.arrayidx
br label %for.inc
if.else:
More information about the llvm-commits
mailing list