blob: 5bf58fa1d50543374b219d5dc7d06af2dfb18594 [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86-64 > %t
Dan Gohman4d6da8c2009-03-17 02:17:27 +00002; RUN: not grep APP %t
3; RUN: grep bswapq %t | count 2
Dan Gohman441a7be2009-03-17 02:45:40 +00004; RUN: grep bswapl %t | count 1
Dan Gohman4d6da8c2009-03-17 02:17:27 +00005
6define i64 @foo(i64 %x) nounwind {
7 %asmtmp = tail call i64 asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %x) nounwind
8 ret i64 %asmtmp
9}
10define i64 @bar(i64 %x) nounwind {
11 %asmtmp = tail call i64 asm "bswapq ${0:q}", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %x) nounwind
12 ret i64 %asmtmp
13}
Dan Gohman441a7be2009-03-17 02:45:40 +000014define i32 @pen(i32 %x) nounwind {
15 %asmtmp = tail call i32 asm "bswapl ${0:q}", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %x) nounwind
16 ret i32 %asmtmp
17}