forked from OSchip/llvm-project
test: Switch to new atomic instructions
This fixes the test with recent versions of LLVM that do not support the old atomic instructions any more. llvm-svn: 145402
This commit is contained in:
parent
a66b37d7ae
commit
39913e3648
|
@ -8,7 +8,7 @@ target triple = "x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
; <label>:0
|
; <label>:0
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:1 ; preds = %12, %0
|
; <label>:1 ; preds = %12, %0
|
||||||
|
@ -50,14 +50,13 @@ define i32 @main() nounwind {
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:13 ; preds = %1
|
; <label>:13 ; preds = %1
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%14 = sext i32 undef to i64 ; <i64> [#uses=1]
|
%14 = sext i32 undef to i64 ; <i64> [#uses=1]
|
||||||
%15 = getelementptr inbounds i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0), i64 %14 ; <i32*> [#uses=1]
|
%15 = getelementptr inbounds i32* getelementptr inbounds ([100 x i32]* @A, i32 0, i32 0), i64 %14 ; <i32*> [#uses=1]
|
||||||
%16 = load i32* %15 ; <i32> [#uses=1]
|
%16 = load i32* %15 ; <i32> [#uses=1]
|
||||||
ret i32 %16
|
ret i32 %16
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
; CHECK: for (c2=0;c2<=2;c2++) {
|
; CHECK: for (c2=0;c2<=2;c2++) {
|
||||||
; CHECK: S0(c2);
|
; CHECK: S0(c2);
|
||||||
; CHECK: S1(c2);
|
; CHECK: S1(c2);
|
||||||
|
|
|
@ -20,8 +20,6 @@ bb3: ; preds = %bb2, %bb1
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
bb:
|
bb:
|
||||||
store i32 2, i32* getelementptr inbounds ([1 x i32]* @A, i32 0, i32 0)
|
store i32 2, i32* getelementptr inbounds ([1 x i32]* @A, i32 0, i32 0)
|
||||||
|
|
|
@ -49,7 +49,7 @@ for.cond1: ; preds = %for.inc, %for.body
|
||||||
for.body4: ; preds = %for.cond1
|
for.body4: ; preds = %for.cond1
|
||||||
%conv = sitofp i32 %add to double ; <double> [#uses=1]
|
%conv = sitofp i32 %add to double ; <double> [#uses=1]
|
||||||
store double %conv, double* %arrayidx10
|
store double %conv, double* %arrayidx10
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%conv13 = sitofp i32 %mul to double ; <double> [#uses=1]
|
%conv13 = sitofp i32 %mul to double ; <double> [#uses=1]
|
||||||
store double %conv13, double* %arrayidx20
|
store double %conv13, double* %arrayidx20
|
||||||
store double 0.000000e+00, double* %arrayidx27
|
store double 0.000000e+00, double* %arrayidx27
|
||||||
|
@ -70,8 +70,6 @@ for.end32: ; preds = %for.cond
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define void @print_array() nounwind {
|
define void @print_array() nounwind {
|
||||||
entry:
|
entry:
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
@ -128,7 +126,7 @@ declare i32 @fprintf(%struct._IO_FILE*, i8*, ...)
|
||||||
|
|
||||||
define void @do_pluto_matmult() nounwind {
|
define void @do_pluto_matmult() nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %do.body
|
br label %do.body
|
||||||
|
|
||||||
do.body: ; preds = %do.cond42, %entry
|
do.body: ; preds = %do.cond42, %entry
|
||||||
|
@ -176,7 +174,7 @@ do.cond42: ; preds = %do.end39
|
||||||
br i1 %exitcond6, label %do.body, label %do.end45
|
br i1 %exitcond6, label %do.body, label %do.end45
|
||||||
|
|
||||||
do.end45: ; preds = %do.cond42
|
do.end45: ; preds = %do.cond42
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ target triple = "x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
define void @loop_with_condition() nounwind {
|
define void @loop_with_condition() nounwind {
|
||||||
; <label>:0
|
; <label>:0
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:1 ; preds = %7, %0
|
; <label>:1 ; preds = %7, %0
|
||||||
|
@ -42,12 +42,10 @@ define void @loop_with_condition() nounwind {
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:8 ; preds = %1
|
; <label>:8 ; preds = %1
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
; <label>:0
|
; <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]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)
|
||||||
|
|
|
@ -10,7 +10,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
define void @loop_with_condition(i32 %m) nounwind {
|
define void @loop_with_condition(i32 %m) nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%tmp = sub i32 0, %m
|
%tmp = sub i32 0, %m
|
||||||
%tmp1 = zext i32 %tmp to i64
|
%tmp1 = zext i32 %tmp to i64
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
@ -45,12 +45,10 @@ for.inc: ; preds = %if.end
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end: ; preds = %for.cond
|
for.end: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
entry:
|
entry:
|
||||||
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]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)
|
||||||
|
|
|
@ -9,7 +9,7 @@ target triple = "x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
define void @loop_with_condition_ineq() nounwind {
|
define void @loop_with_condition_ineq() nounwind {
|
||||||
; <label>:0
|
; <label>:0
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:1 ; preds = %7, %0
|
; <label>:1 ; preds = %7, %0
|
||||||
|
@ -41,12 +41,10 @@ define void @loop_with_condition_ineq() nounwind {
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:8 ; preds = %1
|
; <label>:8 ; preds = %1
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
; <label>:0
|
; <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]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)
|
||||||
|
|
|
@ -9,7 +9,7 @@ target triple = "x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
define void @loop_with_condition() nounwind {
|
define void @loop_with_condition() nounwind {
|
||||||
; <label>:0
|
; <label>:0
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:1 ; preds = %10, %0
|
; <label>:1 ; preds = %10, %0
|
||||||
|
@ -48,12 +48,10 @@ define void @loop_with_condition() nounwind {
|
||||||
br label %1
|
br label %1
|
||||||
|
|
||||||
; <label>:11 ; preds = %1
|
; <label>:11 ; preds = %1
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
; <label>:0
|
; <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]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)
|
||||||
|
|
|
@ -11,7 +11,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
define void @pluto_matmult() nounwind {
|
define void @pluto_matmult() nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.cond: ; preds = %for.inc44, %entry
|
for.cond: ; preds = %for.inc44, %entry
|
||||||
|
@ -68,12 +68,10 @@ for.inc44: ; preds = %for.end43
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end47: ; preds = %for.cond
|
for.end47: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void (...)* @init_array()
|
call void (...)* @init_array()
|
||||||
|
|
|
@ -17,7 +17,7 @@ define i32 @main() nounwind {
|
||||||
%5 = getelementptr inbounds [1021 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%5 = getelementptr inbounds [1021 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%6 = getelementptr inbounds i32* %5, i64 1 ; <i32*> [#uses=1]
|
%6 = getelementptr inbounds i32* %5, i64 1 ; <i32*> [#uses=1]
|
||||||
store i32 1, i32* %6
|
store i32 1, i32* %6
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %7
|
br label %7
|
||||||
|
|
||||||
; <label>:7 ; preds = %14, %0
|
; <label>:7 ; preds = %14, %0
|
||||||
|
@ -46,7 +46,7 @@ define i32 @main() nounwind {
|
||||||
|
|
||||||
; <label>:15 ; preds = %7
|
; <label>:15 ; preds = %7
|
||||||
%red.0.lcssa = phi i32 [ %red.0, %7 ] ; <i32> [#uses=1]
|
%red.0.lcssa = phi i32 [ %red.0, %7 ] ; <i32> [#uses=1]
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%16 = icmp ne i32 %red.0.lcssa, 382399368 ; <i1> [#uses=1]
|
%16 = icmp ne i32 %red.0.lcssa, 382399368 ; <i1> [#uses=1]
|
||||||
br i1 %16, label %17, label %18
|
br i1 %16, label %17, label %18
|
||||||
|
|
||||||
|
@ -60,5 +60,4 @@ define i32 @main() nounwind {
|
||||||
|
|
||||||
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
|
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
; CHECK: Could not generate independent blocks
|
; CHECK: Could not generate independent blocks
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define N 20
|
#define N 20
|
||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
volatile int A[N];
|
int A[N];
|
||||||
|
|
||||||
void single_do_loop_int_max_iterations() {
|
void single_do_loop_int_max_iterations() {
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -15,12 +15,12 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
define void @single_do_loop_int_max_iterations() nounwind {
|
define void @single_do_loop_int_max_iterations() nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %do.body
|
br label %do.body
|
||||||
|
|
||||||
do.body: ; preds = %do.cond, %entry
|
do.body: ; preds = %do.cond, %entry
|
||||||
%0 = phi i32 [ 0, %entry ], [ %inc, %do.cond ] ; <i32> [#uses=2]
|
%0 = phi i32 [ 0, %entry ], [ %inc, %do.cond ] ; <i32> [#uses=2]
|
||||||
volatile store i32 %0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
store i32 %0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
||||||
%inc = add nsw i32 %0, 1 ; <i32> [#uses=2]
|
%inc = add nsw i32 %0, 1 ; <i32> [#uses=2]
|
||||||
br label %do.cond
|
br label %do.cond
|
||||||
|
|
||||||
|
@ -29,20 +29,18 @@ do.cond: ; preds = %do.body
|
||||||
br i1 %exitcond, label %do.body, label %do.end
|
br i1 %exitcond, label %do.body, label %do.end
|
||||||
|
|
||||||
do.end: ; preds = %do.cond
|
do.end: ; preds = %do.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
entry:
|
entry:
|
||||||
volatile store i32 0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
store i32 0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
||||||
call void @single_do_loop_int_max_iterations()
|
call void @single_do_loop_int_max_iterations()
|
||||||
%tmp = load %struct._IO_FILE** @stdout ; <%struct._IO_FILE*> [#uses=1]
|
%tmp = load %struct._IO_FILE** @stdout ; <%struct._IO_FILE*> [#uses=1]
|
||||||
%tmp1 = volatile load i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
|
%tmp1 = load 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]
|
%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 = volatile load i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
|
%tmp2 = load i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
|
||||||
%cmp = icmp eq i32 %tmp2, 2147483646 ; <i1> [#uses=1]
|
%cmp = icmp eq i32 %tmp2, 2147483646 ; <i1> [#uses=1]
|
||||||
br i1 %cmp, label %if.then, label %if.else
|
br i1 %cmp, label %if.then, label %if.else
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#define N 20
|
define N 20
|
||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
volatile int A[N];
|
int A[N];
|
||||||
|
|
||||||
void bar (int n) {
|
void bar (int n) {
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -8,7 +8,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
define void @bar(i32 %n) nounwind {
|
define void @bar(i32 %n) nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%tmp = mul i32 %n, 2 ; <i32> [#uses=2]
|
%tmp = mul i32 %n, 2 ; <i32> [#uses=2]
|
||||||
%tmp1 = icmp sgt i32 %tmp, 1 ; <i1> [#uses=1]
|
%tmp1 = icmp sgt i32 %tmp, 1 ; <i1> [#uses=1]
|
||||||
%smax = select i1 %tmp1, i32 %tmp, i32 1 ; <i32> [#uses=1]
|
%smax = select i1 %tmp1, i32 %tmp, i32 1 ; <i32> [#uses=1]
|
||||||
|
@ -16,7 +16,7 @@ entry:
|
||||||
|
|
||||||
do.body: ; preds = %do.cond, %entry
|
do.body: ; preds = %do.cond, %entry
|
||||||
%0 = phi i32 [ 0, %entry ], [ %inc, %do.cond ] ; <i32> [#uses=2]
|
%0 = phi i32 [ 0, %entry ], [ %inc, %do.cond ] ; <i32> [#uses=2]
|
||||||
volatile store i32 %0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
store i32 %0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
||||||
%inc = add nsw i32 %0, 1 ; <i32> [#uses=2]
|
%inc = add nsw i32 %0, 1 ; <i32> [#uses=2]
|
||||||
br label %do.cond
|
br label %do.cond
|
||||||
|
|
||||||
|
@ -25,17 +25,15 @@ do.cond: ; preds = %do.body
|
||||||
br i1 %exitcond, label %do.body, label %do.end
|
br i1 %exitcond, label %do.body, label %do.end
|
||||||
|
|
||||||
do.end: ; preds = %do.cond
|
do.end: ; preds = %do.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
entry:
|
entry:
|
||||||
volatile store i32 0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
store i32 0, i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0)
|
||||||
call void @bar(i32 10)
|
call void @bar(i32 10)
|
||||||
%tmp = volatile load i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
|
%tmp = load i32* getelementptr inbounds ([20 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
|
||||||
%cmp = icmp eq i32 %tmp, 19 ; <i1> [#uses=1]
|
%cmp = icmp eq i32 %tmp, 19 ; <i1> [#uses=1]
|
||||||
br i1 %cmp, label %if.then, label %if.else
|
br i1 %cmp, label %if.then, label %if.else
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#define N 20
|
#define N 20
|
||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
volatile long long A[N];
|
long long A[N];
|
||||||
|
|
||||||
int main () {
|
int main () {
|
||||||
long long i;
|
long long i;
|
||||||
|
|
|
@ -8,13 +8,13 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
entry:
|
entry:
|
||||||
volatile store i64 0, i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0)
|
store i64 0, i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0)
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %do.body
|
br label %do.body
|
||||||
|
|
||||||
do.body: ; preds = %do.cond, %entry
|
do.body: ; preds = %do.cond, %entry
|
||||||
%0 = phi i64 [ 0, %entry ], [ %inc, %do.cond ] ; <i64> [#uses=2]
|
%0 = phi i64 [ 0, %entry ], [ %inc, %do.cond ] ; <i64> [#uses=2]
|
||||||
volatile store i64 %0, i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0)
|
store i64 %0, i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0)
|
||||||
%inc = add nsw i64 %0, 1 ; <i64> [#uses=2]
|
%inc = add nsw i64 %0, 1 ; <i64> [#uses=2]
|
||||||
br label %do.cond
|
br label %do.cond
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ do.cond: ; preds = %do.body
|
||||||
br i1 %exitcond, label %do.body, label %do.end
|
br i1 %exitcond, label %do.body, label %do.end
|
||||||
|
|
||||||
do.end: ; preds = %do.cond
|
do.end: ; preds = %do.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%tmp3 = volatile load i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0) ; <i64> [#uses=1]
|
%tmp3 = load i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0) ; <i64> [#uses=1]
|
||||||
%cmp4 = icmp eq i64 %tmp3, 9223372036854775806 ; <i1> [#uses=1]
|
%cmp4 = icmp eq i64 %tmp3, 9223372036854775806 ; <i1> [#uses=1]
|
||||||
br i1 %cmp4, label %if.then, label %if.else
|
br i1 %cmp4, label %if.then, label %if.else
|
||||||
|
|
||||||
|
@ -39,6 +39,5 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {
|
; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ entry:
|
||||||
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
||||||
store i32 1, i32* %arrayidx
|
store i32 1, i32* %arrayidx
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %do.body
|
br label %do.body
|
||||||
|
|
||||||
do.body: ; preds = %do.cond, %entry
|
do.body: ; preds = %do.cond, %entry
|
||||||
|
@ -24,7 +24,7 @@ do.cond: ; preds = %do.body
|
||||||
br i1 false, label %do.body, label %do.end
|
br i1 false, label %do.body, label %do.end
|
||||||
|
|
||||||
do.end: ; preds = %do.cond
|
do.end: ; preds = %do.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%arraydecay4 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay4 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx5 = getelementptr inbounds i32* %arraydecay4, i64 0 ; <i32*> [#uses=1]
|
%arrayidx5 = getelementptr inbounds i32* %arraydecay4, i64 0 ; <i32*> [#uses=1]
|
||||||
%tmp6 = load i32* %arrayidx5 ; <i32> [#uses=1]
|
%tmp6 = load i32* %arrayidx5 ; <i32> [#uses=1]
|
||||||
|
@ -42,5 +42,4 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
; CHECK: S0(0)
|
; CHECK: S0(0)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define N 20
|
#define N 20
|
||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
volatile int A[2 * N];
|
int A[2 * N];
|
||||||
|
|
||||||
void single_do_loop_scev_replace() {
|
void single_do_loop_scev_replace() {
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -14,7 +14,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
define void @single_do_loop_scev_replace() nounwind {
|
define void @single_do_loop_scev_replace() nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %do.body
|
br label %do.body
|
||||||
|
|
||||||
do.body: ; preds = %do.cond, %entry
|
do.body: ; preds = %do.cond, %entry
|
||||||
|
@ -25,25 +25,23 @@ do.body: ; preds = %do.cond, %entry
|
||||||
br label %do.cond
|
br label %do.cond
|
||||||
|
|
||||||
do.cond: ; preds = %do.body
|
do.cond: ; preds = %do.body
|
||||||
volatile store i32 %i.0, i32* %arrayidx
|
store i32 %i.0, i32* %arrayidx
|
||||||
%indvar.next = add i64 %indvar, 1 ; <i64> [#uses=2]
|
%indvar.next = add i64 %indvar, 1 ; <i64> [#uses=2]
|
||||||
%exitcond = icmp ne i64 %indvar.next, 20 ; <i1> [#uses=1]
|
%exitcond = icmp ne i64 %indvar.next, 20 ; <i1> [#uses=1]
|
||||||
br i1 %exitcond, label %do.body, label %do.end
|
br i1 %exitcond, label %do.body, label %do.end
|
||||||
|
|
||||||
do.end: ; preds = %do.cond
|
do.end: ; preds = %do.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
entry:
|
entry:
|
||||||
call void @single_do_loop_scev_replace()
|
call void @single_do_loop_scev_replace()
|
||||||
%tmp = load %struct._IO_FILE** @stdout ; <%struct._IO_FILE*> [#uses=1]
|
%tmp = load %struct._IO_FILE** @stdout ; <%struct._IO_FILE*> [#uses=1]
|
||||||
%tmp1 = volatile load i32* getelementptr inbounds ([40 x i32]* @A, i32 0, i32 0) ; <i32> [#uses=1]
|
%tmp1 = load 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]
|
%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 = volatile load i32* getelementptr inbounds ([40 x i32]* @A, i32 0, i64 38) ; <i32> [#uses=1]
|
%tmp2 = load i32* getelementptr inbounds ([40 x i32]* @A, i32 0, i64 38) ; <i32> [#uses=1]
|
||||||
%cmp = icmp eq i32 %tmp2, 19 ; <i1> [#uses=1]
|
%cmp = icmp eq i32 %tmp2, 19 ; <i1> [#uses=1]
|
||||||
br i1 %cmp, label %if.then, label %if.else
|
br i1 %cmp, label %if.then, label %if.else
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ entry:
|
||||||
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
||||||
store i32 0, i32* %arrayidx
|
store i32 0, i32* %arrayidx
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.cond: ; preds = %for.inc, %entry
|
for.cond: ; preds = %for.inc, %entry
|
||||||
|
@ -30,7 +30,7 @@ for.inc: ; preds = %for.body
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end: ; preds = %for.cond
|
for.end: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
||||||
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
||||||
|
@ -48,6 +48,4 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
; CHECK:for (c2=0;c2<=2147483646;c2++) {
|
; CHECK:for (c2=0;c2<=2147483646;c2++) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ entry:
|
||||||
%arraydecay = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
%arraydecay = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
||||||
%arrayidx = getelementptr inbounds i64* %arraydecay, i64 0 ; <i64*> [#uses=1]
|
%arrayidx = getelementptr inbounds i64* %arraydecay, i64 0 ; <i64*> [#uses=1]
|
||||||
store i64 0, i64* %arrayidx
|
store i64 0, i64* %arrayidx
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.cond: ; preds = %for.inc, %entry
|
for.cond: ; preds = %for.inc, %entry
|
||||||
|
@ -30,7 +30,7 @@ for.inc: ; preds = %for.body
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end: ; preds = %for.cond
|
for.end: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%arraydecay5 = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
%arraydecay5 = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
||||||
%arrayidx6 = getelementptr inbounds i64* %arraydecay5, i64 0 ; <i64*> [#uses=1]
|
%arrayidx6 = getelementptr inbounds i64* %arraydecay5, i64 0 ; <i64*> [#uses=1]
|
||||||
%tmp7 = load i64* %arrayidx6 ; <i64> [#uses=1]
|
%tmp7 = load i64* %arrayidx6 ; <i64> [#uses=1]
|
||||||
|
@ -48,6 +48,4 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {
|
; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ entry:
|
||||||
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
||||||
store i32 0, i32* %arrayidx
|
store i32 0, i32* %arrayidx
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.cond: ; preds = %for.inc, %entry
|
for.cond: ; preds = %for.inc, %entry
|
||||||
|
@ -28,7 +28,7 @@ for.inc: ; preds = %for.body
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end: ; preds = %for.cond
|
for.end: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
||||||
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
||||||
|
@ -46,6 +46,4 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
; CHECK: Stmt_for_body(0);
|
; CHECK: Stmt_for_body(0);
|
||||||
|
|
|
@ -8,7 +8,7 @@ target triple = "x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
define void @bar(i64 %n) nounwind {
|
define void @bar(i64 %n) nounwind {
|
||||||
bb:
|
bb:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %bb1
|
br label %bb1
|
||||||
|
|
||||||
bb1: ; preds = %bb3, %bb
|
bb1: ; preds = %bb3, %bb
|
||||||
|
@ -26,12 +26,10 @@ bb3: ; preds = %bb2
|
||||||
br label %bb1
|
br label %bb1
|
||||||
|
|
||||||
bb4: ; preds = %bb1
|
bb4: ; preds = %bb1
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
bb:
|
bb:
|
||||||
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]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)
|
||||||
|
|
|
@ -10,7 +10,7 @@ entry:
|
||||||
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
||||||
store i32 0, i32* %arrayidx
|
store i32 0, i32* %arrayidx
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.cond: ; preds = %for.inc, %entry
|
for.cond: ; preds = %for.inc, %entry
|
||||||
|
@ -29,7 +29,7 @@ for.inc: ; preds = %for.body
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end: ; preds = %for.cond
|
for.end: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
||||||
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
||||||
|
@ -47,6 +47,4 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
; CHECK:for (c2=0;
|
; CHECK:for (c2=0;
|
||||||
|
|
|
@ -10,7 +10,7 @@ entry:
|
||||||
%arraydecay = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
%arraydecay = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
||||||
%arrayidx = getelementptr inbounds i64* %arraydecay, i64 0 ; <i64*> [#uses=1]
|
%arrayidx = getelementptr inbounds i64* %arraydecay, i64 0 ; <i64*> [#uses=1]
|
||||||
store i64 0, i64* %arrayidx
|
store i64 0, i64* %arrayidx
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.cond: ; preds = %for.inc, %entry
|
for.cond: ; preds = %for.inc, %entry
|
||||||
|
@ -29,7 +29,7 @@ for.inc: ; preds = %for.body
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end: ; preds = %for.cond
|
for.end: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%arraydecay5 = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
%arraydecay5 = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
|
||||||
%arrayidx6 = getelementptr inbounds i64* %arraydecay5, i64 0 ; <i64*> [#uses=1]
|
%arrayidx6 = getelementptr inbounds i64* %arraydecay5, i64 0 ; <i64*> [#uses=1]
|
||||||
%tmp7 = load i64* %arrayidx6 ; <i64> [#uses=1]
|
%tmp7 = load i64* %arrayidx6 ; <i64> [#uses=1]
|
||||||
|
@ -47,5 +47,4 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
; CHECK:for (c2=0;
|
; CHECK:for (c2=0;
|
||||||
|
|
|
@ -10,7 +10,7 @@ entry:
|
||||||
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
|
||||||
store i32 0, i32* %arrayidx
|
store i32 0, i32* %arrayidx
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.cond: ; preds = %for.inc, %entry
|
for.cond: ; preds = %for.inc, %entry
|
||||||
|
@ -27,7 +27,7 @@ for.inc: ; preds = %for.body
|
||||||
br label %for.cond
|
br label %for.cond
|
||||||
|
|
||||||
for.end: ; preds = %for.cond
|
for.end: ; preds = %for.cond
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
%arraydecay5 = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||||
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
|
||||||
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
|
||||||
|
@ -45,7 +45,6 @@ return: ; preds = %if.else, %if.then
|
||||||
ret i32 %retval.0
|
ret i32 %retval.0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
; CHECK: for region: 'for.cond => for.end.region' in function 'main':
|
; CHECK: for region: 'for.cond => for.end.region' in function 'main':
|
||||||
; CHECK-NEXT: main():
|
; CHECK-NEXT: main():
|
||||||
; CHECK-NEXT: Stmt_for_body(0);
|
; CHECK-NEXT: Stmt_for_body(0);
|
||||||
|
|
|
@ -4,7 +4,7 @@ target triple = "x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
define void @loop_with_condition() nounwind {
|
define void @loop_with_condition() nounwind {
|
||||||
bb0:
|
bb0:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %bb1
|
br label %bb1
|
||||||
|
|
||||||
bb1:
|
bb1:
|
||||||
|
@ -25,14 +25,11 @@ bb4:
|
||||||
br label %bb5
|
br label %bb5
|
||||||
|
|
||||||
bb5:
|
bb5:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
|
|
||||||
; CHECK: polly.enterScop
|
; CHECK: polly.enterScop
|
||||||
; CHECK: polly.finalMerge
|
; CHECK: polly.finalMerge
|
||||||
; CHECK: polly.enterScop
|
; CHECK: polly.enterScop
|
||||||
|
|
|
@ -5,7 +5,7 @@ target triple = "x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
define void @loop_with_condition() nounwind {
|
define void @loop_with_condition() nounwind {
|
||||||
bb0:
|
bb0:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
br label %bb1
|
br label %bb1
|
||||||
|
|
||||||
bb1:
|
bb1:
|
||||||
|
@ -21,13 +21,11 @@ bb4:
|
||||||
br label %bb5
|
br label %bb5
|
||||||
|
|
||||||
bb5:
|
bb5:
|
||||||
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
|
fence seq_cst
|
||||||
ret void
|
ret void
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
|
|
||||||
|
|
||||||
; CHECK: polly.enterScop
|
; CHECK: polly.enterScop
|
||||||
; CHECK-NOT: polly.finalMerge
|
; CHECK-NOT: polly.finalMerge
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue