summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb2
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-06-26 16:52:32 +0000
committerTim Northover <tnorthover@apple.com>2013-06-26 16:52:32 +0000
commit52f77f5cda047842d23868871227e32843afc9f2 (patch)
tree12542436d6e7ece23df0a22197555c294aa0da47 /llvm/test/CodeGen/Thumb2
parent0b2ffe30e4e9c623698af38683aab0714d428f5d (diff)
downloadbcm5719-llvm-52f77f5cda047842d23868871227e32843afc9f2.tar.gz
bcm5719-llvm-52f77f5cda047842d23868871227e32843afc9f2.zip
ARM: allow predicated barriers in Thumb mode
The barrier instructions are only "always-execute" in ARM mode, they can quite happily sit inside an IT block in Thumb. llvm-svn: 184964
Diffstat (limited to 'llvm/test/CodeGen/Thumb2')
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-branch.ll22
1 files changed, 12 insertions, 10 deletions
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-branch.ll b/llvm/test/CodeGen/Thumb2/thumb2-branch.ll
index f1c097c1892..5e3a7d1c95c 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-branch.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-branch.ll
@@ -1,8 +1,10 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+thumb2 | FileCheck %s
-; If-conversion defeats the purpose of this test, which is to check conditional
-; branch generation, so use memory barrier instruction to make sure it doesn't
+; If-conversion defeats the purpose of this test, which is to check
+; conditional branch generation, so a call to make sure it doesn't
; happen and we get actual branches.
+declare void @foo()
+
define i32 @f1(i32 %a, i32 %b, i32* %v) {
entry:
; CHECK: f1:
@@ -11,12 +13,12 @@ entry:
br i1 %tmp, label %cond_true, label %return
cond_true: ; preds = %entry
- fence seq_cst
+ call void @foo()
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- fence seq_cst
+ call void @foo()
ret i32 1
}
@@ -28,12 +30,12 @@ entry:
br i1 %tmp, label %cond_true, label %return
cond_true: ; preds = %entry
- fence seq_cst
+ call void @foo()
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- fence seq_cst
+ call void @foo()
ret i32 1
}
@@ -45,12 +47,12 @@ entry:
br i1 %tmp, label %cond_true, label %return
cond_true: ; preds = %entry
- fence seq_cst
+ call void @foo()
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- fence seq_cst
+ call void @foo()
ret i32 1
}
@@ -62,11 +64,11 @@ entry:
br i1 %tmp, label %cond_true, label %return
cond_true: ; preds = %entry
- fence seq_cst
+ call void @foo()
store i32 0, i32* %v
ret i32 0
return: ; preds = %entry
- fence seq_cst
+ call void @foo()
ret i32 1
}
OpenPOWER on IntegriCloud