summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/X86/inline-asm-obj.ll
blob: 2ee998dbc45df1662fbe45c8bdb0f41d308a1ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
}
OpenPOWER on IntegriCloud