1*0a6a1f1dSLionel Sambuc; RUN: llc < %s -mtriple=i386-apple-darwin9 -O0 -optimize-regalloc -regalloc=basic -no-integrated-as | FileCheck %s 2f4a2713aSLionel Sambuc; rdar://6992609 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc; CHECK: movl [[EDX:%e..]], 4(%esp) 5f4a2713aSLionel Sambuc; CHECK: movl [[EDX]], 4(%esp) 6f4a2713aSLionel Sambuctarget triple = "i386-apple-darwin9.0" 7f4a2713aSLionel Sambuc@llvm.used = appending global [1 x i8*] [i8* bitcast (i64 (i64)* @_OSSwapInt64 to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] 8f4a2713aSLionel Sambuc 9f4a2713aSLionel Sambucdefine i64 @_OSSwapInt64(i64 %_data) nounwind { 10f4a2713aSLionel Sambucentry: 11f4a2713aSLionel Sambuc %retval = alloca i64 ; <i64*> [#uses=2] 12f4a2713aSLionel Sambuc %_data.addr = alloca i64 ; <i64*> [#uses=4] 13f4a2713aSLionel Sambuc store i64 %_data, i64* %_data.addr 14f4a2713aSLionel Sambuc %tmp = load i64* %_data.addr ; <i64> [#uses=1] 15f4a2713aSLionel Sambuc %0 = call i64 asm "bswap %eax\0A\09bswap %edx\0A\09xchgl %eax, %edx", "=A,0,~{dirflag},~{fpsr},~{flags}"(i64 %tmp) nounwind ; <i64> [#uses=1] 16f4a2713aSLionel Sambuc store i64 %0, i64* %_data.addr 17f4a2713aSLionel Sambuc %tmp1 = load i64* %_data.addr ; <i64> [#uses=1] 18f4a2713aSLionel Sambuc store i64 %tmp1, i64* %retval 19f4a2713aSLionel Sambuc %1 = load i64* %retval ; <i64> [#uses=1] 20f4a2713aSLionel Sambuc ret i64 %1 21f4a2713aSLionel Sambuc} 22f4a2713aSLionel Sambuc 23f4a2713aSLionel Sambuc; The tied operands are not necessarily in the same order as the defs. 24f4a2713aSLionel Sambuc; PR13742 25f4a2713aSLionel Sambucdefine i64 @swapped(i64 %x, i64 %y) nounwind { 26f4a2713aSLionel Sambucentry: 27f4a2713aSLionel Sambuc %x0 = call { i64, i64 } asm "foo", "=r,=r,1,0,~{dirflag},~{fpsr},~{flags}"(i64 %x, i64 %y) nounwind 28f4a2713aSLionel Sambuc %x1 = extractvalue { i64, i64 } %x0, 0 29f4a2713aSLionel Sambuc ret i64 %x1 30f4a2713aSLionel Sambuc} 31