summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/bswap-inline-asm.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-03-17 02:45:40 +0000
committerDan Gohman <gohman@apple.com>2009-03-17 02:45:40 +0000
commitd6e571b20205cb4bdb1b13f7b8ee88c30c102747 (patch)
tree74e94d7773f3432d1b22c7b97a5da5de907aab1c /llvm/test/CodeGen/X86/bswap-inline-asm.ll
parent77a9279d80f3a29cea61001b30d1a471f42281d0 (diff)
downloadbcm5719-llvm-d6e571b20205cb4bdb1b13f7b8ee88c30c102747.tar.gz
bcm5719-llvm-d6e571b20205cb4bdb1b13f7b8ee88c30c102747.zip
Recognize bswapl as bswap too.
llvm-svn: 67072
Diffstat (limited to 'llvm/test/CodeGen/X86/bswap-inline-asm.ll')
-rw-r--r--llvm/test/CodeGen/X86/bswap-inline-asm.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/bswap-inline-asm.ll b/llvm/test/CodeGen/X86/bswap-inline-asm.ll
index c44d845c832..91f8310361a 100644
--- a/llvm/test/CodeGen/X86/bswap-inline-asm.ll
+++ b/llvm/test/CodeGen/X86/bswap-inline-asm.ll
@@ -1,6 +1,7 @@
; RUN: llvm-as < %s | llc -march=x86-64 > %t
; RUN: not grep APP %t
; RUN: grep bswapq %t | count 2
+; RUN: grep bswapl %t | count 1
define i64 @foo(i64 %x) nounwind {
%asmtmp = tail call i64 asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %x) nounwind
@@ -10,3 +11,7 @@ define i64 @bar(i64 %x) nounwind {
%asmtmp = tail call i64 asm "bswapq ${0:q}", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %x) nounwind
ret i64 %asmtmp
}
+define i32 @pen(i32 %x) nounwind {
+ %asmtmp = tail call i32 asm "bswapl ${0:q}", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %x) nounwind
+ ret i32 %asmtmp
+}
OpenPOWER on IntegriCloud