diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-25 16:16:08 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-25 16:16:08 +0000 |
| commit | d63d3cd507e5801c4acb8d1423efc114235d1c52 (patch) | |
| tree | d65da680f3778fbd3392b5fb933a57c304933df4 /llvm/test/MC/X86/inline-asm-obj.ll | |
| parent | 60c1a8c01a2c87b3dfde4374c847cf7128b683a3 (diff) | |
| download | bcm5719-llvm-d63d3cd507e5801c4acb8d1423efc114235d1c52.tar.gz bcm5719-llvm-d63d3cd507e5801c4acb8d1423efc114235d1c52.zip | |
Add a test for a recent regression.
llvm-svn: 240656
Diffstat (limited to 'llvm/test/MC/X86/inline-asm-obj.ll')
| -rw-r--r-- | llvm/test/MC/X86/inline-asm-obj.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/inline-asm-obj.ll b/llvm/test/MC/X86/inline-asm-obj.ll new file mode 100644 index 00000000000..2ee998dbc45 --- /dev/null +++ b/llvm/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 +} |

