summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
commit63faed5b8e4f2755f127fcb8aa440480c0649327 (patch)
tree19c69a04768629f2d440944b71cbe90adae0b615 /test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll
parentd4c8b5d2e851b0e8a063c6bf8543a4823a26c15a (diff)
Notes
Diffstat (limited to 'test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll')
-rw-r--r--test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll b/test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll
new file mode 100644
index 0000000000000..c9ea691249684
--- /dev/null
+++ b/test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll
@@ -0,0 +1,36 @@
+; RUN: llc -march=arm -mcpu=cortex-a8 -verify-machineinstrs < %s
+; PR12165
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "arm-none-linux"
+
+define hidden void @_strtod_r() nounwind {
+ br i1 undef, label %1, label %2
+
+; <label>:1 ; preds = %0
+ br label %2
+
+; <label>:2 ; preds = %1, %0
+ br i1 undef, label %3, label %8
+
+; <label>:3 ; preds = %2
+ br i1 undef, label %4, label %7
+
+; <label>:4 ; preds = %3
+ %5 = call i32 @llvm.flt.rounds()
+ %6 = icmp eq i32 %5, 1
+ br i1 %6, label %8, label %7
+
+; <label>:7 ; preds = %4, %3
+ unreachable
+
+; <label>:8 ; preds = %4, %2
+ br i1 undef, label %9, label %10
+
+; <label>:9 ; preds = %8
+ br label %10
+
+; <label>:10 ; preds = %9, %8
+ ret void
+}
+
+declare i32 @llvm.flt.rounds() nounwind