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:
Tobias Grosser 2011-11-29 14:51:05 +00:00
parent a66b37d7ae
commit 39913e3648
27 changed files with 63 additions and 104 deletions

View File

@ -8,7 +8,7 @@ target triple = "x86_64-pc-linux-gnu"
define i32 @main() nounwind {
; <label>:0
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %1
; <label>:1 ; preds = %12, %0
@ -50,14 +50,13 @@ define i32 @main() nounwind {
br label %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]
%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]
ret i32 %16
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK: for (c2=0;c2<=2;c2++) {
; CHECK: S0(c2);
; CHECK: S1(c2);

View File

@ -20,8 +20,6 @@ bb3: ; preds = %bb2, %bb1
ret void
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
bb:
store i32 2, i32* getelementptr inbounds ([1 x i32]* @A, i32 0, i32 0)

View File

@ -49,7 +49,7 @@ for.cond1: ; preds = %for.inc, %for.body
for.body4: ; preds = %for.cond1
%conv = sitofp i32 %add to double ; <double> [#uses=1]
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]
store double %conv13, double* %arrayidx20
store double 0.000000e+00, double* %arrayidx27
@ -70,8 +70,6 @@ for.end32: ; preds = %for.cond
ret void
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define void @print_array() nounwind {
entry:
br label %for.cond
@ -128,7 +126,7 @@ declare i32 @fprintf(%struct._IO_FILE*, i8*, ...)
define void @do_pluto_matmult() nounwind {
entry:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %do.body
do.body: ; preds = %do.cond42, %entry
@ -176,7 +174,7 @@ do.cond42: ; preds = %do.end39
br i1 %exitcond6, label %do.body, label %do.end45
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
}

View File

@ -10,7 +10,7 @@ target triple = "x86_64-pc-linux-gnu"
define void @loop_with_condition() nounwind {
; <label>:0
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %1
; <label>:1 ; preds = %7, %0
@ -42,12 +42,10 @@ define void @loop_with_condition() nounwind {
br label %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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
; <label>:0
call void @llvm.memset.p0i8.i64(i8* bitcast ([1024 x i32]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)

View File

@ -10,7 +10,7 @@ target triple = "x86_64-unknown-linux-gnu"
define void @loop_with_condition(i32 %m) nounwind {
entry:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
%tmp = sub i32 0, %m
%tmp1 = zext i32 %tmp to i64
br label %for.cond
@ -45,12 +45,10 @@ for.inc: ; preds = %if.end
br label %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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
entry:
call void @llvm.memset.p0i8.i64(i8* bitcast ([1024 x i32]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)

View File

@ -9,7 +9,7 @@ target triple = "x86_64-pc-linux-gnu"
define void @loop_with_condition_ineq() nounwind {
; <label>:0
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %1
; <label>:1 ; preds = %7, %0
@ -41,12 +41,10 @@ define void @loop_with_condition_ineq() nounwind {
br label %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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
; <label>:0
call void @llvm.memset.p0i8.i64(i8* bitcast ([1024 x i32]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)

View File

@ -9,7 +9,7 @@ target triple = "x86_64-pc-linux-gnu"
define void @loop_with_condition() nounwind {
; <label>:0
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %1
; <label>:1 ; preds = %10, %0
@ -48,12 +48,10 @@ define void @loop_with_condition() nounwind {
br label %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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
; <label>:0
call void @llvm.memset.p0i8.i64(i8* bitcast ([1024 x i32]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)

View File

@ -11,7 +11,7 @@ target triple = "x86_64-unknown-linux-gnu"
define void @pluto_matmult() nounwind {
entry:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %for.cond
for.cond: ; preds = %for.inc44, %entry
@ -68,12 +68,10 @@ for.inc44: ; preds = %for.end43
br label %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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
entry:
call void (...)* @init_array()

View File

@ -17,7 +17,7 @@ define i32 @main() nounwind {
%5 = getelementptr inbounds [1021 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%6 = getelementptr inbounds i32* %5, i64 1 ; <i32*> [#uses=1]
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
; <label>:7 ; preds = %14, %0
@ -46,7 +46,7 @@ define i32 @main() nounwind {
; <label>:15 ; preds = %7
%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]
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.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK: Could not generate independent blocks

View File

@ -1,7 +1,7 @@
#define N 20
#include "limits.h"
#include <stdio.h>
volatile int A[N];
int A[N];
void single_do_loop_int_max_iterations() {
int i;

View File

@ -15,12 +15,12 @@ target triple = "x86_64-unknown-linux-gnu"
define void @single_do_loop_int_max_iterations() nounwind {
entry:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %do.body
do.body: ; preds = %do.cond, %entry
%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]
br label %do.cond
@ -29,20 +29,18 @@ do.cond: ; preds = %do.body
br i1 %exitcond, label %do.body, label %do.end
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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
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()
%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]
%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]
br i1 %cmp, label %if.then, label %if.else

View File

@ -1,6 +1,6 @@
#define N 20
define N 20
#include "limits.h"
volatile int A[N];
int A[N];
void bar (int n) {
int i;

View File

@ -8,7 +8,7 @@ target triple = "x86_64-unknown-linux-gnu"
define void @bar(i32 %n) nounwind {
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]
%tmp1 = icmp sgt i32 %tmp, 1 ; <i1> [#uses=1]
%smax = select i1 %tmp1, i32 %tmp, i32 1 ; <i32> [#uses=1]
@ -16,7 +16,7 @@ entry:
do.body: ; preds = %do.cond, %entry
%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]
br label %do.cond
@ -25,17 +25,15 @@ do.cond: ; preds = %do.body
br i1 %exitcond, label %do.body, label %do.end
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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
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)
%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]
br i1 %cmp, label %if.then, label %if.else

View File

@ -1,6 +1,6 @@
#define N 20
#include "limits.h"
volatile long long A[N];
long long A[N];
int main () {
long long i;

View File

@ -8,13 +8,13 @@ target triple = "x86_64-unknown-linux-gnu"
define i32 @main() nounwind {
entry:
volatile 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)
store i64 0, i64* getelementptr inbounds ([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]
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]
br label %do.cond
@ -23,8 +23,8 @@ do.cond: ; preds = %do.body
br i1 %exitcond, label %do.body, label %do.end
do.end: ; preds = %do.cond
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
%tmp3 = volatile load i64* getelementptr inbounds ([20 x i64]* @A, i32 0, i32 0) ; <i64> [#uses=1]
fence seq_cst
%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]
br i1 %cmp4, label %if.then, label %if.else
@ -39,6 +39,5 @@ return: ; preds = %if.else, %if.then
ret i32 %retval.0
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {

View File

@ -11,7 +11,7 @@ entry:
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
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
do.body: ; preds = %do.cond, %entry
@ -24,7 +24,7 @@ do.cond: ; preds = %do.body
br i1 false, label %do.body, label %do.end
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]
%arrayidx5 = getelementptr inbounds i32* %arraydecay4, i64 0 ; <i32*> [#uses=1]
%tmp6 = load i32* %arrayidx5 ; <i32> [#uses=1]
@ -42,5 +42,4 @@ return: ; preds = %if.else, %if.then
ret i32 %retval.0
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK: S0(0)

View File

@ -1,7 +1,7 @@
#define N 20
#include "limits.h"
#include <stdio.h>
volatile int A[2 * N];
int A[2 * N];
void single_do_loop_scev_replace() {
int i;

View File

@ -14,7 +14,7 @@ target triple = "x86_64-unknown-linux-gnu"
define void @single_do_loop_scev_replace() nounwind {
entry:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %do.body
do.body: ; preds = %do.cond, %entry
@ -25,25 +25,23 @@ do.body: ; preds = %do.cond, %entry
br label %do.cond
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]
%exitcond = icmp ne i64 %indvar.next, 20 ; <i1> [#uses=1]
br i1 %exitcond, label %do.body, label %do.end
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
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
entry:
call void @single_do_loop_scev_replace()
%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]
%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]
br i1 %cmp, label %if.then, label %if.else

View File

@ -11,7 +11,7 @@ entry:
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
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
for.cond: ; preds = %for.inc, %entry
@ -30,7 +30,7 @@ for.inc: ; preds = %for.body
br label %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]
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
@ -48,6 +48,4 @@ return: ; preds = %if.else, %if.then
ret i32 %retval.0
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK:for (c2=0;c2<=2147483646;c2++) {

View File

@ -11,7 +11,7 @@ entry:
%arraydecay = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
%arrayidx = getelementptr inbounds i64* %arraydecay, i64 0 ; <i64*> [#uses=1]
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
for.cond: ; preds = %for.inc, %entry
@ -30,7 +30,7 @@ for.inc: ; preds = %for.body
br label %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]
%arrayidx6 = getelementptr inbounds i64* %arraydecay5, i64 0 ; <i64*> [#uses=1]
%tmp7 = load i64* %arrayidx6 ; <i64> [#uses=1]
@ -48,6 +48,4 @@ return: ; preds = %if.else, %if.then
ret i32 %retval.0
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {

View File

@ -10,7 +10,7 @@ entry:
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
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
for.cond: ; preds = %for.inc, %entry
@ -28,7 +28,7 @@ for.inc: ; preds = %for.body
br label %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]
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
@ -46,6 +46,4 @@ return: ; preds = %if.else, %if.then
ret i32 %retval.0
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK: Stmt_for_body(0);

View File

@ -8,7 +8,7 @@ target triple = "x86_64-pc-linux-gnu"
define void @bar(i64 %n) nounwind {
bb:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %bb1
bb1: ; preds = %bb3, %bb
@ -26,12 +26,10 @@ bb3: ; preds = %bb2
br label %bb1
bb4: ; preds = %bb1
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
ret void
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
define i32 @main() nounwind {
bb:
call void @llvm.memset.p0i8.i64(i8* bitcast ([1024 x i32]* @A to i8*), i8 0, i64 4096, i32 1, i1 false)

View File

@ -10,7 +10,7 @@ entry:
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
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
for.cond: ; preds = %for.inc, %entry
@ -29,7 +29,7 @@ for.inc: ; preds = %for.body
br label %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]
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
@ -47,6 +47,4 @@ return: ; preds = %if.else, %if.then
ret i32 %retval.0
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK:for (c2=0;

View File

@ -10,7 +10,7 @@ entry:
%arraydecay = getelementptr inbounds [20 x i64]* %A, i32 0, i32 0 ; <i64*> [#uses=1]
%arrayidx = getelementptr inbounds i64* %arraydecay, i64 0 ; <i64*> [#uses=1]
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
for.cond: ; preds = %for.inc, %entry
@ -29,7 +29,7 @@ for.inc: ; preds = %for.body
br label %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]
%arrayidx6 = getelementptr inbounds i64* %arraydecay5, i64 0 ; <i64*> [#uses=1]
%tmp7 = load i64* %arrayidx6 ; <i64> [#uses=1]
@ -47,5 +47,4 @@ return: ; preds = %if.else, %if.then
ret i32 %retval.0
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK:for (c2=0;

View File

@ -10,7 +10,7 @@ entry:
%arraydecay = getelementptr inbounds [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
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
for.cond: ; preds = %for.inc, %entry
@ -27,7 +27,7 @@ for.inc: ; preds = %for.body
br label %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]
%arrayidx6 = getelementptr inbounds i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
%tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
@ -45,7 +45,6 @@ return: ; preds = %if.else, %if.then
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-NEXT: main():
; CHECK-NEXT: Stmt_for_body(0);

View File

@ -4,7 +4,7 @@ target triple = "x86_64-pc-linux-gnu"
define void @loop_with_condition() nounwind {
bb0:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %bb1
bb1:
@ -25,14 +25,11 @@ bb4:
br label %bb5
bb5:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
ret void
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK: polly.enterScop
; CHECK: polly.finalMerge
; CHECK: polly.enterScop

View File

@ -5,7 +5,7 @@ target triple = "x86_64-pc-linux-gnu"
define void @loop_with_condition() nounwind {
bb0:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
br label %bb1
bb1:
@ -21,13 +21,11 @@ bb4:
br label %bb5
bb5:
call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
fence seq_cst
ret void
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
; CHECK: polly.enterScop
; CHECK-NOT: polly.finalMerge