New test cases for bit accurate integers developed by Guoling Han.
[oota-llvm.git] / test / Integer / unreachable_bt.ll
diff --git a/test/Integer/unreachable_bt.ll b/test/Integer/unreachable_bt.ll
new file mode 100644 (file)
index 0000000..1ab4e8e
--- /dev/null
@@ -0,0 +1,17 @@
+; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
+; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
+; RUN: diff %t1.ll %t2.ll
+
+
+implementation
+
+declare void %bar()
+
+define i9 %foo() {  ;; Calling this function has undefined behavior
+       unreachable
+}
+
+define double %xyz() {
+       call void %bar()
+       unreachable          ;; Bar must not return.
+}