[llvm-commits] [polly] r145402 - /polly/trunk/test/CodeGen/

Tobias Grosser grosser at fim.uni-passau.de
Tue Nov 29 06:51:05 PST 2011


Author: grosser
Date: Tue Nov 29 08:51:05 2011
New Revision: 145402

URL: http://llvm.org/viewvc/llvm-project?rev=145402&view=rev
Log:
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.

Modified:
    polly/trunk/test/CodeGen/20100720-MultipleConditions.ll
    polly/trunk/test/CodeGen/constant_condition.ll
    polly/trunk/test/CodeGen/do_pluto_matmult.ll
    polly/trunk/test/CodeGen/loop_with_condition.ll
    polly/trunk/test/CodeGen/loop_with_condition_2.ll
    polly/trunk/test/CodeGen/loop_with_condition_ineq.ll
    polly/trunk/test/CodeGen/loop_with_condition_nested.ll
    polly/trunk/test/CodeGen/pluto_matmult.ll
    polly/trunk/test/CodeGen/reduction.ll
    polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.c
    polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.ll
    polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.c
    polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.ll
    polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.c
    polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.ll
    polly/trunk/test/CodeGen/single_do_loop_one_iteration.ll
    polly/trunk/test/CodeGen/single_do_loop_scev_replace.c
    polly/trunk/test/CodeGen/single_do_loop_scev_replace.ll
    polly/trunk/test/CodeGen/single_loop_int_max_iterations.ll
    polly/trunk/test/CodeGen/single_loop_ll_max_iterations.ll
    polly/trunk/test/CodeGen/single_loop_one_iteration.ll
    polly/trunk/test/CodeGen/single_loop_param.ll
    polly/trunk/test/CodeGen/single_loop_uint_max_iterations.ll
    polly/trunk/test/CodeGen/single_loop_ull_max_iterations.ll
    polly/trunk/test/CodeGen/single_loop_zero_iterations.ll
    polly/trunk/test/CodeGen/split_edges.ll
    polly/trunk/test/CodeGen/split_edges_2.ll

Modified: polly/trunk/test/CodeGen/20100720-MultipleConditions.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/20100720-MultipleConditions.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/20100720-MultipleConditions.ll (original)
+++ polly/trunk/test/CodeGen/20100720-MultipleConditions.ll Tue Nov 29 08:51:05 2011
@@ -8,7 +8,7 @@
 
 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 @@
   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);

Modified: polly/trunk/test/CodeGen/constant_condition.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/constant_condition.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/constant_condition.ll (original)
+++ polly/trunk/test/CodeGen/constant_condition.ll Tue Nov 29 08:51:05 2011
@@ -20,8 +20,6 @@
   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)

Modified: polly/trunk/test/CodeGen/do_pluto_matmult.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/do_pluto_matmult.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/do_pluto_matmult.ll (original)
+++ polly/trunk/test/CodeGen/do_pluto_matmult.ll Tue Nov 29 08:51:05 2011
@@ -49,7 +49,7 @@
 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 @@
   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 @@
 
 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 @@
   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
 }
 

Modified: polly/trunk/test/CodeGen/loop_with_condition.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/loop_with_condition.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/loop_with_condition.ll (original)
+++ polly/trunk/test/CodeGen/loop_with_condition.ll Tue Nov 29 08:51:05 2011
@@ -10,7 +10,7 @@
 
 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 @@
   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)

Modified: polly/trunk/test/CodeGen/loop_with_condition_2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/loop_with_condition_2.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/loop_with_condition_2.ll (original)
+++ polly/trunk/test/CodeGen/loop_with_condition_2.ll Tue Nov 29 08:51:05 2011
@@ -10,7 +10,7 @@
 
 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 @@
   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)

Modified: polly/trunk/test/CodeGen/loop_with_condition_ineq.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/loop_with_condition_ineq.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/loop_with_condition_ineq.ll (original)
+++ polly/trunk/test/CodeGen/loop_with_condition_ineq.ll Tue Nov 29 08:51:05 2011
@@ -9,7 +9,7 @@
 
 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 @@
   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)

Modified: polly/trunk/test/CodeGen/loop_with_condition_nested.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/loop_with_condition_nested.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/loop_with_condition_nested.ll (original)
+++ polly/trunk/test/CodeGen/loop_with_condition_nested.ll Tue Nov 29 08:51:05 2011
@@ -9,7 +9,7 @@
 
 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 @@
   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)

Modified: polly/trunk/test/CodeGen/pluto_matmult.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/pluto_matmult.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/pluto_matmult.ll (original)
+++ polly/trunk/test/CodeGen/pluto_matmult.ll Tue Nov 29 08:51:05 2011
@@ -11,7 +11,7 @@
 
 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 @@
   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()

Modified: polly/trunk/test/CodeGen/reduction.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/reduction.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/reduction.ll (original)
+++ polly/trunk/test/CodeGen/reduction.ll Tue Nov 29 08:51:05 2011
@@ -17,7 +17,7 @@
   %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 @@
 
 ; <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 @@
 
 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

Modified: polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.c?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.c (original)
+++ polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.c Tue Nov 29 08:51:05 2011
@@ -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;

Modified: polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.ll Tue Nov 29 08:51:05 2011
@@ -15,12 +15,12 @@
 
 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 @@
   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
 

Modified: polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.c?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.c (original)
+++ polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.c Tue Nov 29 08:51:05 2011
@@ -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;

Modified: polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.ll Tue Nov 29 08:51:05 2011
@@ -8,7 +8,7 @@
 
 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 @@
 
 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 @@
   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
 

Modified: polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.c?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.c (original)
+++ polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.c Tue Nov 29 08:51:05 2011
@@ -1,6 +1,6 @@
 #define N 20
 #include "limits.h"
-volatile long long A[N];
+long long A[N];
 
 int main () {
   long long i;

Modified: polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.ll Tue Nov 29 08:51:05 2011
@@ -8,13 +8,13 @@
 
 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 @@
   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 @@
   ret i32 %retval.0
 }
 
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
 ; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {
 

Modified: polly/trunk/test/CodeGen/single_do_loop_one_iteration.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_one_iteration.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_one_iteration.ll (original)
+++ polly/trunk/test/CodeGen/single_do_loop_one_iteration.ll Tue Nov 29 08:51:05 2011
@@ -11,7 +11,7 @@
   %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 @@
   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 @@
   ret i32 %retval.0
 }
 
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
 ; CHECK: S0(0)

Modified: polly/trunk/test/CodeGen/single_do_loop_scev_replace.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_scev_replace.c?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_scev_replace.c (original)
+++ polly/trunk/test/CodeGen/single_do_loop_scev_replace.c Tue Nov 29 08:51:05 2011
@@ -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;

Modified: polly/trunk/test/CodeGen/single_do_loop_scev_replace.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_do_loop_scev_replace.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_do_loop_scev_replace.ll (original)
+++ polly/trunk/test/CodeGen/single_do_loop_scev_replace.ll Tue Nov 29 08:51:05 2011
@@ -14,7 +14,7 @@
 
 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 @@
   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
 

Modified: polly/trunk/test/CodeGen/single_loop_int_max_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_loop_int_max_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_loop_int_max_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_loop_int_max_iterations.ll Tue Nov 29 08:51:05 2011
@@ -11,7 +11,7 @@
   %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 @@
   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 @@
   ret i32 %retval.0
 }
 
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
-
 ; CHECK:for (c2=0;c2<=2147483646;c2++) {

Modified: polly/trunk/test/CodeGen/single_loop_ll_max_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_loop_ll_max_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_loop_ll_max_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_loop_ll_max_iterations.ll Tue Nov 29 08:51:05 2011
@@ -11,7 +11,7 @@
   %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 @@
   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 @@
   ret i32 %retval.0
 }
 
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
-
 ; CHECK:for (c2=0;c2<=9223372036854775806;c2++) {

Modified: polly/trunk/test/CodeGen/single_loop_one_iteration.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_loop_one_iteration.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_loop_one_iteration.ll (original)
+++ polly/trunk/test/CodeGen/single_loop_one_iteration.ll Tue Nov 29 08:51:05 2011
@@ -10,7 +10,7 @@
   %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 @@
   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 @@
   ret i32 %retval.0
 }
 
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
-
 ; CHECK: Stmt_for_body(0);

Modified: polly/trunk/test/CodeGen/single_loop_param.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_loop_param.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_loop_param.ll (original)
+++ polly/trunk/test/CodeGen/single_loop_param.ll Tue Nov 29 08:51:05 2011
@@ -8,7 +8,7 @@
 
 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 @@
   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)

Modified: polly/trunk/test/CodeGen/single_loop_uint_max_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_loop_uint_max_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_loop_uint_max_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_loop_uint_max_iterations.ll Tue Nov 29 08:51:05 2011
@@ -10,7 +10,7 @@
   %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 @@
   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 @@
   ret i32 %retval.0
 }
 
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
-
 ; CHECK:for (c2=0;

Modified: polly/trunk/test/CodeGen/single_loop_ull_max_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_loop_ull_max_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_loop_ull_max_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_loop_ull_max_iterations.ll Tue Nov 29 08:51:05 2011
@@ -10,7 +10,7 @@
   %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 @@
   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 @@
   ret i32 %retval.0
 }
 
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
 ; CHECK:for (c2=0;

Modified: polly/trunk/test/CodeGen/single_loop_zero_iterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/single_loop_zero_iterations.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/single_loop_zero_iterations.ll (original)
+++ polly/trunk/test/CodeGen/single_loop_zero_iterations.ll Tue Nov 29 08:51:05 2011
@@ -10,7 +10,7 @@
   %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 @@
   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 @@
   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);

Modified: polly/trunk/test/CodeGen/split_edges.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/split_edges.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/split_edges.ll (original)
+++ polly/trunk/test/CodeGen/split_edges.ll Tue Nov 29 08:51:05 2011
@@ -4,7 +4,7 @@
 
 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 @@
   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

Modified: polly/trunk/test/CodeGen/split_edges_2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/split_edges_2.ll?rev=145402&r1=145401&r2=145402&view=diff
==============================================================================
--- polly/trunk/test/CodeGen/split_edges_2.ll (original)
+++ polly/trunk/test/CodeGen/split_edges_2.ll Tue Nov 29 08:51:05 2011
@@ -5,7 +5,7 @@
 
 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 @@
   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
 





More information about the llvm-commits mailing list