[llvm-commits] [llvm] r140567 - in /llvm/trunk/test/CodeGen: Thumb/barrier.ll Thumb2/thumb2-bcc.ll Thumb2/thumb2-branch.ll
Eli Friedman
eli.friedman at gmail.com
Mon Sep 26 14:36:10 PDT 2011
Author: efriedma
Date: Mon Sep 26 16:36:10 2011
New Revision: 140567
URL: http://llvm.org/viewvc/llvm-project?rev=140567&view=rev
Log:
Convert more tests to new atomic instructions.
Modified:
llvm/trunk/test/CodeGen/Thumb/barrier.ll
llvm/trunk/test/CodeGen/Thumb2/thumb2-bcc.ll
llvm/trunk/test/CodeGen/Thumb2/thumb2-branch.ll
Modified: llvm/trunk/test/CodeGen/Thumb/barrier.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/barrier.ll?rev=140567&r1=140566&r2=140567&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb/barrier.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb/barrier.ll Mon Sep 26 16:36:10 2011
@@ -2,24 +2,12 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=-db | FileCheck %s -check-prefix=V6
; RUN: llc < %s -march=thumb -mcpu=cortex-m0 | FileCheck %s -check-prefix=V6M
-declare void @llvm.memory.barrier(i1 , i1 , i1 , i1 , i1)
-
define void @t1() {
; V6: t1:
; V6: blx {{_*}}sync_synchronize
; V6M: t1:
-; V6M: dmb st
- call void @llvm.memory.barrier(i1 false, i1 false, i1 false, i1 true, i1 true)
- ret void
-}
-
-define void @t2() {
-; V6: t2:
-; V6: blx {{_*}}sync_synchronize
-
-; V6M: t2:
; V6M: dmb ish
- call void @llvm.memory.barrier(i1 true, i1 false, i1 false, i1 true, i1 false)
+ fence seq_cst
ret void
}
Modified: llvm/trunk/test/CodeGen/Thumb2/thumb2-bcc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/thumb2-bcc.ll?rev=140567&r1=140566&r2=140567&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb2/thumb2-bcc.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb2/thumb2-bcc.ll Mon Sep 26 16:36:10 2011
@@ -6,20 +6,18 @@
define i32 @t1(i32 %a, i32 %b, i32 %c) {
; CHECK: t1:
; CHECK: cbz
- %tmp2 = icmp eq i32 %a, 0
- br i1 %tmp2, label %cond_false, label %cond_true
+ %tmp2 = icmp eq i32 %a, 0
+ br i1 %tmp2, label %cond_false, label %cond_true
cond_true:
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
- %tmp5 = add i32 %b, 1
- %tmp6 = and i32 %tmp5, %c
- ret i32 %tmp6
+ fence seq_cst
+ %tmp5 = add i32 %b, 1
+ %tmp6 = and i32 %tmp5, %c
+ ret i32 %tmp6
cond_false:
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
- %tmp7 = add i32 %b, -1
- %tmp8 = xor i32 %tmp7, %c
- ret i32 %tmp8
+ fence seq_cst
+ %tmp7 = add i32 %b, -1
+ %tmp8 = xor i32 %tmp7, %c
+ ret i32 %tmp8
}
-
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
Modified: llvm/trunk/test/CodeGen/Thumb2/thumb2-branch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/thumb2-branch.ll?rev=140567&r1=140566&r2=140567&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb2/thumb2-branch.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb2/thumb2-branch.ll Mon Sep 26 16:36:10 2011
@@ -11,12 +11,12 @@
br i1 %tmp, label %cond_true, label %return
cond_true: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
ret i32 1
}
@@ -28,12 +28,12 @@
br i1 %tmp, label %cond_true, label %return
cond_true: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
ret i32 1
}
@@ -45,12 +45,12 @@
br i1 %tmp, label %cond_true, label %return
cond_true: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
ret i32 1
}
@@ -62,13 +62,11 @@
br i1 %tmp, label %return, label %cond_true
cond_true: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true, i1 false)
+ fence seq_cst
ret i32 1
}
-
-declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
More information about the llvm-commits
mailing list