Test case updates for explicit type parameter to the gep operator

llvm-svn: 232186
This commit is contained in:
David Blaikie 2015-03-13 18:21:20 +00:00
parent 81e96f8192
commit 4a54fae8cb
26 changed files with 71 additions and 71 deletions

View File

@ -49,7 +49,7 @@ bb34: ; preds = %bb35
%9 = getelementptr inbounds [32 x double], [32 x double]* %8, i64 0, i64 0 ; <double*> [#uses=1]
%10 = load double, double* %9, align 8 ; <double> [#uses=0]
%11 = fsub double 0.000000e+00, undef ; <double> [#uses=1]
%12 = getelementptr inbounds double, double* getelementptr inbounds ([4 x [36 x double]]* @win193, i64 0, i64 2, i64 4), i64 0 ; <double*> [#uses=1]
%12 = getelementptr inbounds double, double* getelementptr inbounds ([4 x [36 x double]], [4 x [36 x double]]* @win193, i64 0, i64 2, i64 4), i64 0 ; <double*> [#uses=1]
store double %11, double* %12, align 8
%13 = add nsw i32 %k.4, 9 ; <i32> [#uses=1]
%14 = add nsw i32 %k.4, 18 ; <i32> [#uses=1]
@ -74,7 +74,7 @@ bb34: ; preds = %bb35
%33 = getelementptr inbounds [32 x double], [32 x double]* %32, i64 0, i64 0 ; <double*> [#uses=1]
%34 = load double, double* %33, align 8 ; <double> [#uses=0]
%35 = sext i32 %13 to i64 ; <i64> [#uses=1]
%36 = getelementptr inbounds double, double* getelementptr inbounds ([4 x [36 x double]]* @win193, i64 0, i64 2, i64 4), i64 %35 ; <double*> [#uses=1]
%36 = getelementptr inbounds double, double* getelementptr inbounds ([4 x [36 x double]], [4 x [36 x double]]* @win193, i64 0, i64 2, i64 4), i64 %35 ; <double*> [#uses=1]
store double 0.000000e+00, double* %36, align 8
%37 = sub nsw i32 %k.4, 1 ; <i32> [#uses=1]
br label %bb35

View File

@ -76,7 +76,7 @@ define i32 @main() nounwind {
; <label>:13 ; preds = %1
fence seq_cst
%14 = sext i32 undef to i64 ; <i64> [#uses=1]
%15 = getelementptr inbounds i32, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0), i64 %14 ; <i32*> [#uses=1]
%15 = getelementptr inbounds i32, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0), i64 %14 ; <i32*> [#uses=1]
%16 = load i32, i32* %15 ; <i32> [#uses=1]
ret i32 %16
}

View File

@ -30,7 +30,7 @@ for.body: ; preds = %for.cond
%tmp2 = load i32, i32* %arrayidx, align 4
%tmp5 = load i32, i32* %arrayidx4, align 4
%add = add nsw i32 %tmp2, %tmp5
store i32 %add, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 13), align 4
store i32 %add, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 13), align 4
br label %for.inc
for.inc: ; preds = %for.body
@ -40,4 +40,4 @@ for.inc: ; preds = %for.body
for.end: ; preds = %for.cond
ret i32 0
}
; CHECK: load i32, i32* getelementptr inbounds ([100 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 10)
; CHECK: load i32, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 10)

View File

@ -30,7 +30,7 @@ for.body: ; preds = %for.cond
%tmp2 = load i32, i32* %arrayidx, align 4
%tmp5 = load i32, i32* %arrayidx4, align 4
%add = add nsw i32 %tmp2, %tmp5
store i32 %add, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 13), align 4
store i32 %add, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 13), align 4
br label %for.inc
for.inc: ; preds = %for.body
@ -40,4 +40,4 @@ for.inc: ; preds = %for.body
for.end: ; preds = %for.cond
ret i32 0
}
; CHECK: load i32, i32* getelementptr inbounds ([100 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0)
; CHECK: load i32, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0)

View File

@ -28,7 +28,7 @@ for.body: ; preds = %for.cond
%tmp2 = load float, float* %arrayidx, align 4
%tmp5 = load float, float* %arrayidx4, align 4
%add = fadd float %tmp2, %tmp5
store float %add, float* getelementptr inbounds ([100 x float]* @A, i32 0, i32 13), align 4
store float %add, float* getelementptr inbounds ([100 x float], [100 x float]* @A, i32 0, i32 13), align 4
br label %for.inc
for.inc: ; preds = %for.body
@ -38,4 +38,4 @@ for.inc: ; preds = %for.body
for.end: ; preds = %for.cond
ret i32 0
}
; CHECK: load float, float* getelementptr inbounds ([100 x float]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0)
; CHECK: load float, float* getelementptr inbounds ([100 x float], [100 x float]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0)

View File

@ -63,7 +63,7 @@ for.end6: ; preds = %for.cond
; WITHCONST: %[[MUL2:[._a-zA-Z0-9]+]] = mul nsw i64 2, %[[IVIn]]
; WITHCONST: %[[SUM1:[._a-zA-Z0-9]+]] = add nsw i64 %[[MUL1]], %[[MUL2]]
; WITHCONST: %[[SUM2:[._a-zA-Z0-9]+]] = add nsw i64 %[[SUM1]], 5
; WITHCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr i32, i32* getelementptr inbounds ([1040 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM2]]
; WITHCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr i32, i32* getelementptr inbounds ([1040 x i32], [1040 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM2]]
; WITHCONST: store i32 100, i32* %[[ACC]]
; WITHOUTCONST: %[[IVOut:polly.indvar[0-9]*]] = phi i64 [ 0, %polly.loop_preheader{{[0-9]*}} ], [ %polly.indvar_next{{[0-9]*}}, %polly.{{[._a-zA-Z0-9]*}} ]
@ -71,5 +71,5 @@ for.end6: ; preds = %for.cond
; WITHOUTCONST: %[[MUL1:[._a-zA-Z0-9]+]] = mul nsw i64 16, %[[IVOut]]
; WITHOUTCONST: %[[MUL2:[._a-zA-Z0-9]+]] = mul nsw i64 2, %[[IVIn]]
; WITHOUTCONST: %[[SUM1:[._a-zA-Z0-9]+]] = add nsw i64 %[[MUL1]], %[[MUL2]]
; WITHOUTCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr i32, i32* getelementptr inbounds ([1040 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM1]]
; WITHOUTCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr i32, i32* getelementptr inbounds ([1040 x i32], [1040 x i32]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM1]]
; WITHOUTCONST: store i32 100, i32* %[[ACC]]

View File

@ -59,7 +59,7 @@ for.end6: ; preds = %for.cond
; WITHCONST: %[[MUL2:[._a-zA-Z0-9]+]] = mul nsw i64 2, %[[IVIn]]
; WITHCONST: %[[SUM1:[._a-zA-Z0-9]+]] = add nsw i64 %[[MUL1]], %[[MUL2]]
; WITHCONST: %[[SUM2:[._a-zA-Z0-9]+]] = add nsw i64 %[[SUM1]], 5
; WITHCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr float, float* getelementptr inbounds ([1040 x float]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM2]]
; WITHCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr float, float* getelementptr inbounds ([1040 x float], [1040 x float]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM2]]
; WITHCONST: store float 1.000000e+02, float* %[[ACC]]
; WITHOUTCONST: %[[IVOut:polly.indvar[0-9]*]] = phi i64 [ 0, %polly.loop_preheader{{[0-9]*}} ], [ %polly.indvar_next{{[0-9]*}}, %polly.{{[._a-zA-Z0-9]*}} ]
@ -67,5 +67,5 @@ for.end6: ; preds = %for.cond
; WITHOUTCONST: %[[MUL1:[._a-zA-Z0-9]+]] = mul nsw i64 16, %[[IVOut]]
; WITHOUTCONST: %[[MUL2:[._a-zA-Z0-9]+]] = mul nsw i64 2, %[[IVIn]]
; WITHOUTCONST: %[[SUM1:[._a-zA-Z0-9]+]] = add nsw i64 %[[MUL1]], %[[MUL2]]
; WITHOUTCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr float, float* getelementptr inbounds ([1040 x float]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM1]]
; WITHOUTCONST: %[[ACC:[._a-zA-Z0-9]*]] = getelementptr float, float* getelementptr inbounds ([1040 x float], [1040 x float]* @A, i{{(32|64)}} 0, i{{(32|64)}} 0), i64 %[[SUM1]]
; WITHOUTCONST: store float 1.000000e+02, float* %[[ACC]]

View File

@ -49,28 +49,28 @@ for.end14: ; preds = %for.cond4
; Verify that the new access function (see above) is actually used during vector code generation.
; JSCOPVEC: store i32 0, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 1, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 2, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 3, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 4, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 5, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 6, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 7, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 8, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 9, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 10, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 11, i32* getelementptr inbounds ([100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 0, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 1, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 2, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 3, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 4, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 5, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 6, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 7, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 8, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 9, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 10, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 11, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @B, i32 0, i32 0)
; JSCOPVEC: store i32 0, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 1, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 2, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 3, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 4, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 5, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 6, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 7, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 8, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 9, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 10, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 11, i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 0, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 1, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 2, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 3, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 4, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 5, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 6, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 7, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 8, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 9, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 10, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)
; JSCOPVEC: store i32 11, i32* getelementptr inbounds ([100 x i32], [100 x i32]* @A, i32 0, i32 0)

View File

@ -33,11 +33,11 @@ bb:
br i1 true, label %bb1, label %bb2
bb1: ; preds = %bb
store i32 0, i32* getelementptr inbounds ([1 x i32]* @A, i32 0, i32 0)
store i32 0, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @A, i32 0, i32 0)
br label %bb3
bb2: ; preds = %bb
store i32 1, i32* getelementptr inbounds ([1 x i32]* @A, i32 0, i32 0)
store i32 1, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @A, i32 0, i32 0)
br label %bb3
bb3: ; preds = %bb2, %bb1
@ -46,9 +46,9 @@ bb3: ; preds = %bb2, %bb1
define i32 @main() nounwind {
bb:
store i32 2, i32* getelementptr inbounds ([1 x i32]* @A, i32 0, i32 0)
store i32 2, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @A, i32 0, i32 0)
call void @constant_condition()
%tmp = load i32, i32* getelementptr inbounds ([1 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%tmp = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
ret i32 %tmp
}

View File

@ -47,7 +47,7 @@ for.end: ; preds = %for.body
%idxprom3 = sext i32 %mul2 to i64
%arrayidx4 = getelementptr inbounds [1048576 x i32], [1048576 x i32]* %A, i64 0, i64 %idxprom3
%2 = load i32, i32* %arrayidx4, align 16
%call5 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str, i64 0, i64 0), i32 %2) nounwind
%call5 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2) nounwind
ret i32 0
}

View File

@ -50,7 +50,7 @@ bb6: ; preds = %bb2
define i32 @main() nounwind {
bb:
call void @simple_vec_const()
%tmp = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 42), align 8
%tmp = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 42), align 8
%tmp1 = fptosi float %tmp to i32
ret i32 %tmp1
}

View File

@ -52,7 +52,7 @@ bb7: ; preds = %bb2
define i32 @main() nounwind {
bb:
call void @simple_vec_const()
%tmp = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 42), align 8
%tmp = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 42), align 8
%tmp1 = fptosi float %tmp to i32
ret i32 %tmp1
}

View File

@ -14,7 +14,7 @@ entry:
body:
%indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ]
%scevgep = getelementptr [1024 x float], [1024 x float]* @B, i64 0, i64 %indvar
%value = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 0), align 16
%value = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16
%result = tail call float @foo(float %value) nounwind
store float %result, float* %scevgep, align 4
%indvar_next = add i64 %indvar, 1

View File

@ -14,7 +14,7 @@ entry:
body:
%indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ]
%scevgep = getelementptr [1024 x float**], [1024 x float**]* @B, i64 0, i64 %indvar
%value = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 0), align 16
%value = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16
%result = tail call float** @foo(float %value) nounwind
store float** %result, float*** %scevgep, align 4
%indvar_next = add i64 %indvar, 1

View File

@ -16,7 +16,7 @@ bb1: ; preds = %bb3, %bb
br i1 %exitcond, label %bb2, label %bb4
bb2: ; preds = %bb1
%tmp = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 0), align 16
%tmp = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16
%tmp2 = fpext float %tmp to double
store double %tmp2, double* %scevgep, align 4
br label %bb3

View File

@ -33,7 +33,7 @@ define void @simple_vec_const() nounwind {
br i1 %exitcond, label %2, label %5
; <label>:2 ; preds = %1
%3 = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 0), align 16
%3 = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16
store float %3, float* %scevgep, align 4
br label %4
@ -47,7 +47,7 @@ define void @simple_vec_const() nounwind {
define i32 @main() nounwind {
call void @simple_vec_const()
%1 = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 42), align 8
%1 = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 42), align 8
%2 = fptosi float %1 to i32
ret i32 %2
}

View File

@ -31,7 +31,7 @@ define void @simple_vec_large_width() nounwind {
define i32 @main() nounwind {
call void @simple_vec_large_width()
%1 = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 42), align 8
%1 = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 42), align 8
%2 = fptosi float %1 to i32
ret i32 %2
}

View File

@ -14,7 +14,7 @@ entry:
body:
%indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ]
%scevgep = getelementptr [1024 x float**], [1024 x float**]* @B, i64 0, i64 %indvar
%value = load float**, float*** getelementptr inbounds ([1024 x float**]* @A, i64 0, i64 0), align 16
%value = load float**, float*** getelementptr inbounds ([1024 x float**], [1024 x float**]* @A, i64 0, i64 0), align 16
store float** %value, float*** %scevgep, align 4
%indvar_next = add i64 %indvar, 1
%exitcond = icmp eq i64 %indvar_next, 4

View File

@ -50,7 +50,7 @@ bb6: ; preds = %bb2
define i32 @main() nounwind {
bb:
call void @simple_vec_stride_x()
%tmp = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 42), align 8
%tmp = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 42), align 8
%tmp1 = fptosi float %tmp to i32
ret i32 %tmp1
}

View File

@ -38,7 +38,7 @@ bb5:
define i32 @main() nounwind {
call void @simple_vec_stride_one()
%1 = load float, float* getelementptr inbounds ([1024 x float]* @A, i64 0, i64 42), align 8
%1 = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 42), align 8
%2 = fptosi float %1 to i32
ret i32 %2
}

View File

@ -52,7 +52,7 @@ entry:
do.body: ; preds = %do.cond, %entry
%0 = phi i32 [ 0, %entry ], [ %inc, %do.cond ] ; <i32> [#uses=2]
store i32 %0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @A, i32 0, i32 0)
%inc = add nsw i32 %0, 1 ; <i32> [#uses=2]
br label %do.cond
@ -67,12 +67,12 @@ do.end: ; preds = %do.cond
define i32 @main() nounwind {
entry:
store i32 0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
store i32 0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @A, i32 0, i32 0)
call void @single_do_loop_int_max_iterations()
%tmp = load %struct._IO_FILE*, %struct._IO_FILE** @stdout ; <%struct._IO_FILE*> [#uses=1]
%tmp1 = load i32, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%call = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %tmp, i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i32 %tmp1) ; <i32> [#uses=0]
%tmp2 = load i32, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%tmp1 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%call = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %tmp, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i32 %tmp1) ; <i32> [#uses=0]
%tmp2 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%cmp = icmp eq i32 %tmp2, 2147483646 ; <i1> [#uses=1]
br i1 %cmp, label %if.then, label %if.else

View File

@ -42,7 +42,7 @@ entry:
do.body: ; preds = %do.cond, %entry
%0 = phi i32 [ 0, %entry ], [ %inc, %do.cond ] ; <i32> [#uses=2]
store i32 %0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @A, i32 0, i32 0)
%inc = add nsw i32 %0, 1 ; <i32> [#uses=2]
br label %do.cond
@ -57,9 +57,9 @@ do.end: ; preds = %do.cond
define i32 @main() nounwind {
entry:
store i32 0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
store i32 0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @A, i32 0, i32 0)
call void @bar(i32 10)
%tmp = load i32, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%tmp = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%cmp = icmp eq i32 %tmp, 19 ; <i1> [#uses=1]
br i1 %cmp, label %if.then, label %if.else

View File

@ -34,13 +34,13 @@ target triple = "x86_64-unknown-linux-gnu"
define i32 @main() nounwind {
entry:
store i64 0, i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0)
store i64 0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @A, i32 0, i32 0)
fence seq_cst
br label %do.body
do.body: ; preds = %do.cond, %entry
%0 = phi i64 [ 0, %entry ], [ %inc, %do.cond ] ; <i64> [#uses=2]
store i64 %0, i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0)
store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @A, i32 0, i32 0)
%inc = add nsw i64 %0, 1 ; <i64> [#uses=2]
br label %do.cond
@ -50,7 +50,7 @@ do.cond: ; preds = %do.body
do.end: ; preds = %do.cond
fence seq_cst
%tmp3 = load i64, i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0) ; <i64> [#uses=1]
%tmp3 = load i64, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @A, i32 0, i32 0) ; <i64> [#uses=1]
%cmp4 = icmp eq i64 %tmp3, 9223372036854775806 ; <i1> [#uses=1]
br i1 %cmp4, label %if.then, label %if.else

View File

@ -70,9 +70,9 @@ define i32 @main() nounwind {
entry:
call void @single_do_loop_scev_replace()
%tmp = load %struct._IO_FILE*, %struct._IO_FILE** @stdout ; <%struct._IO_FILE*> [#uses=1]
%tmp1 = load i32, i32* getelementptr inbounds ([40 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%call = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %tmp, i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i32 %tmp1) ; <i32> [#uses=0]
%tmp2 = load i32, i32* getelementptr inbounds ([40 x i32]* @A, i32 0, i64 38) ; <i32> [#uses=1]
%tmp1 = load i32, i32* getelementptr inbounds ([40 x i32], [40 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
%call = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %tmp, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i32 %tmp1) ; <i32> [#uses=0]
%tmp2 = load i32, i32* getelementptr inbounds ([40 x i32], [40 x i32]* @A, i32 0, i64 38) ; <i32> [#uses=1]
%cmp = icmp eq i32 %tmp2, 19 ; <i1> [#uses=1]
br i1 %cmp, label %if.then, label %if.else

View File

@ -94,14 +94,14 @@ for.body3: ; preds = %for.cond1
%arrayidx5 = getelementptr inbounds [1536 x float], [1536 x float]* %arrayidx, i32 0, i64 %idxprom
%1 = load float, float* %arrayidx5, align 4
%conv = fpext float %1 to double
%call = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %0, i8* getelementptr inbounds ([5 x i8]* @.str, i32 0, i32 0), double %conv)
%call = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), double %conv)
%rem = srem i32 %j.0, 80
%cmp6 = icmp eq i32 %rem, 79
br i1 %cmp6, label %if.then, label %if.end
if.then: ; preds = %for.body3
%2 = load %struct._IO_FILE*, %struct._IO_FILE** @stdout, align 8
%call8 = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %2, i8* getelementptr inbounds ([2 x i8]* @.str1, i32 0, i32 0))
%call8 = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str1, i32 0, i32 0))
br label %if.end
if.end: ; preds = %if.then, %for.body3
@ -113,7 +113,7 @@ for.inc: ; preds = %if.end
for.end: ; preds = %for.cond1
%3 = load %struct._IO_FILE*, %struct._IO_FILE** @stdout, align 8
%call9 = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %3, i8* getelementptr inbounds ([2 x i8]* @.str1, i32 0, i32 0))
%call9 = call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str1, i32 0, i32 0))
br label %for.inc10
for.inc10: ; preds = %for.end

View File

@ -30,7 +30,7 @@ for.end: ; preds = %for.body
%idxprom3 = sext i32 %mul2 to i64
%arrayidx4 = getelementptr inbounds [1048576 x i32], [1048576 x i32]* %A, i64 0, i64 %idxprom3
%2 = load i32, i32* %arrayidx4, align 16
%call5 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str, i64 0, i64 0), i32 %2) nounwind
%call5 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2) nounwind
ret i32 0
}