From b12380a76d6616e621a2b01581c15784dd013fcf Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 25 Jun 2015 16:16:08 +0000 Subject: [PATCH] Add a test for a recent regression. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240656 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/X86/inline-asm-obj.ll | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/MC/X86/inline-asm-obj.ll diff --git a/test/MC/X86/inline-asm-obj.ll b/test/MC/X86/inline-asm-obj.ll new file mode 100644 index 00000000000..2ee998dbc45 --- /dev/null +++ b/test/MC/X86/inline-asm-obj.ll @@ -0,0 +1,13 @@ +; RUN: llc %s -o - | llvm-mc -triple=x86_64-pc-linux -o %t1 -filetype=obj +; RUN: llc %s -o %t2 -filetype=obj +; RUN: cmp %t1 %t2 + +; Test that we can handle inline assembly referring to a temporary label. +; We crashed when using direct object emission in the past. + +target triple = "x86_64-unknown-linux-gnu" + +define void @fj() { + call void asm "bsr $0,%eax", "o"(i32 1) + ret void +} -- 2.34.1