From dc21e16bb4721949f82d7a23e23a39c40db14cdf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 20 Jul 2006 19:04:36 +0000 Subject: [PATCH] New testcase for PR833 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29225 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/2006-07-20-InlineAsm.ll | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/CodeGen/X86/2006-07-20-InlineAsm.ll diff --git a/test/CodeGen/X86/2006-07-20-InlineAsm.ll b/test/CodeGen/X86/2006-07-20-InlineAsm.ll new file mode 100644 index 00000000000..6bf9cc94a46 --- /dev/null +++ b/test/CodeGen/X86/2006-07-20-InlineAsm.ll @@ -0,0 +1,24 @@ +; RUN: llvm-as < %s | llc -march=x86 +; PR833 + +%G = weak global int 0 ; [#uses=3] + +implementation ; Functions: + +int %foo(int %X) { +entry: + %X_addr = alloca int ; [#uses=3] + store int %X, int* %X_addr + call void asm sideeffect "xchg{l} {$0,$1|$1,$0}", "==m,==r,m,1,~{dirflag},~{fpsr},~{flags}"( int* %G, int* %X_addr, int* %G, int %X ) + %tmp1 = load int* %X_addr ; [#uses=1] + ret int %tmp1 +} + +int %foo2(int %X) { +entry: + %X_addr = alloca int ; [#uses=3] + store int %X, int* %X_addr + call void asm sideeffect "xchg{l} {$0,$1|$1,$0}", "==m,==r,1,~{dirflag},~{fpsr},~{flags}"( int* %G, int* %X_addr, int %X ) + %tmp1 = load int* %X_addr ; [#uses=1] + ret int %tmp1 +} -- 2.34.1