Reapply r238011 with a fix for the trap instruction.
[oota-llvm.git] / test / CodeGen / X86 / x86-framelowering-trap.ll
diff --git a/test/CodeGen/X86/x86-framelowering-trap.ll b/test/CodeGen/X86/x86-framelowering-trap.ll
new file mode 100644 (file)
index 0000000..58a1da2
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: llc %s -o - | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; CHECK-LABEL: bar:
+; CHECK: ud2
+; CHECK-NEXT: retq
+define void @bar() {
+entry:
+  call void @llvm.trap()
+  ret void
+}
+
+; Function Attrs: noreturn nounwind
+declare void @llvm.trap()