diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2010-11-13 19:54:30 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2010-11-13 19:54:30 +0000 |
commit | 948cf0289f8280f7e069603837d56c862515c6e1 (patch) | |
tree | f3490681cdb6b9ee3c28db0f7ab0b9cd74a48346 /test/CodeGen/X86/bswap-inline-asm.ll | |
parent | 983611836cd1edec8d1b8032e0539b6ed80461d6 (diff) | |
download | external_llvm-948cf0289f8280f7e069603837d56c862515c6e1.zip external_llvm-948cf0289f8280f7e069603837d56c862515c6e1.tar.gz external_llvm-948cf0289f8280f7e069603837d56c862515c6e1.tar.bz2 |
Recognise 32-bit ror-based bswap implementation used by uclibc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/bswap-inline-asm.ll')
-rw-r--r-- | test/CodeGen/X86/bswap-inline-asm.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/X86/bswap-inline-asm.ll b/test/CodeGen/X86/bswap-inline-asm.ll index 2b70193..ecb4cec 100644 --- a/test/CodeGen/X86/bswap-inline-asm.ll +++ b/test/CodeGen/X86/bswap-inline-asm.ll @@ -65,6 +65,13 @@ define i32 @t32(i32 %x) nounwind { ret i32 %asmtmp } +; CHECK: u32: +; CHECK: bswapl +define i32 @u32(i32 %x) nounwind { + %asmtmp = tail call i32 asm "rorw $$8, ${0:w};rorl $$16, $0;rorw $$8, ${0:w}", "=r,0,~{cc},~{dirflag},~{flags},~{fpsr}"(i32 %x) nounwind + ret i32 %asmtmp +} + ; CHECK: s64: ; CHECK: bswapq define i64 @s64(i64 %x) nounwind { |