Handle code gen for the unreachable instruction if it's the only instruction in
[oota-llvm.git] / test / CodeGen / X86 / 2008-01-25-EmptyFunction.ll
index b936686798f03121bec85a109992231a66fa44de..4baa294fb88d3681e3e389637a0bdbe9e7760107 100644 (file)
@@ -1,8 +1,17 @@
-; RUN: llc < %s -march=x86 | grep nop
+; RUN: llc < %s -march=x86 | FileCheck -check-prefix=NO-FP %s
+; RUN: llc < %s -march=x86 -disable-fp-elim | FileCheck -check-prefix=FP %s
 target triple = "i686-apple-darwin8"
 
+define void @func1() noreturn nounwind  {
+entry:
+; NO-FP: ud2
+        unreachable
+}
 
-define void @bork() noreturn nounwind  {
+define void @func2() noreturn nounwind  {
 entry:
+; FP: pushl %ebp
+; FP: movl %esp, %ebp
+; FP: ud2
         unreachable
 }