summaryrefslogtreecommitdiffstats
path: root/test/Other
diff options
context:
space:
mode:
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/2010-05-06-Printer.ll6
-rw-r--r--test/Other/inline-asm-newline-terminator.ll7
-rw-r--r--test/Other/lint.ll15
3 files changed, 28 insertions, 0 deletions
diff --git a/test/Other/2010-05-06-Printer.ll b/test/Other/2010-05-06-Printer.ll
new file mode 100644
index 0000000..17abafa
--- /dev/null
+++ b/test/Other/2010-05-06-Printer.ll
@@ -0,0 +1,6 @@
+; RUN: llc -O2 -print-after-all < %s 2>&1
+
+define void @tester(){
+ ret void
+}
+
diff --git a/test/Other/inline-asm-newline-terminator.ll b/test/Other/inline-asm-newline-terminator.ll
new file mode 100644
index 0000000..f6cc5c1
--- /dev/null
+++ b/test/Other/inline-asm-newline-terminator.ll
@@ -0,0 +1,7 @@
+; RUN: llc -filetype=obj -o - < %s
+; XFAIL: vg_leak
+
+; ModuleID = 't.c'
+target triple = "x86_64-apple-darwin10.0.0"
+
+module asm ".desc _f0, 0x10"
diff --git a/test/Other/lint.ll b/test/Other/lint.ll
index d0db5e4..1f9efe3 100644
--- a/test/Other/lint.ll
+++ b/test/Other/lint.ll
@@ -2,6 +2,7 @@
target datalayout = "e-p:64:64:64"
declare fastcc void @bar()
+declare void @llvm.stackrestore(i8*)
@CG = constant i32 7
@@ -50,6 +51,8 @@ define i32 @foo() noreturn {
%lb = load i32* bitcast (i8* blockaddress(@foo, %next) to i32*)
; CHECK: Call to block address
call void()* bitcast (i8* blockaddress(@foo, %next) to void()*)()
+; CHECK: Undefined behavior: Null pointer dereference
+ call void @llvm.stackrestore(i8* null)
br label %next
@@ -77,8 +80,20 @@ define void @not_vararg(i8* %p) nounwind {
ret void
}
+; CHECK: Undefined behavior: Branch to non-blockaddress
define void @use_indbr() {
indirectbr i8* bitcast (i32()* @foo to i8*), [label %block]
block:
unreachable
}
+
+; CHECK: Undefined behavior: Call with "tail" keyword references alloca or va_arg
+; CHECK: Undefined behavior: Call with "tail" keyword references alloca or va_arg
+declare void @tailcallee(i8*)
+define void @use_tail(i8* %valist) {
+ %t = alloca i8
+ tail call void @tailcallee(i8* %t)
+ %s = va_arg i8* %valist, i8*
+ tail call void @tailcallee(i8* %s)
+ ret void
+}
OpenPOWER on IntegriCloud