• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=i386-apple-darwin9 -O0 -regalloc=linearscan | grep {movl	%edx, 4(%esp)} | count 2
2; rdar://6992609
3
4target triple = "i386-apple-darwin9.0"
5@llvm.used = appending global [1 x i8*] [i8* bitcast (i64 (i64)* @_OSSwapInt64 to i8*)], section "llvm.metadata"		; <[1 x i8*]*> [#uses=0]
6
7define i64 @_OSSwapInt64(i64 %_data) nounwind {
8entry:
9	%retval = alloca i64		; <i64*> [#uses=2]
10	%_data.addr = alloca i64		; <i64*> [#uses=4]
11	store i64 %_data, i64* %_data.addr
12	%tmp = load i64* %_data.addr		; <i64> [#uses=1]
13	%0 = call i64 asm "bswap   %eax\0A\09bswap   %edx\0A\09xchgl   %eax, %edx", "=A,0,~{dirflag},~{fpsr},~{flags}"(i64 %tmp) nounwind		; <i64> [#uses=1]
14	store i64 %0, i64* %_data.addr
15	%tmp1 = load i64* %_data.addr		; <i64> [#uses=1]
16	store i64 %tmp1, i64* %retval
17	%1 = load i64* %retval		; <i64> [#uses=1]
18	ret i64 %1
19}
20