diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-01-08 01:24:27 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-08 01:24:27 +0000 |
commit | 55d42003368c57d3a41c5f464d39b8440050d558 (patch) | |
tree | 6e956d1dd4a8145a80d41d556acbca48ed96a3f0 /test/CodeGen | |
parent | c36b7069b42bece963b7e6adf020353ce990ef76 (diff) | |
download | external_llvm-55d42003368c57d3a41c5f464d39b8440050d558.zip external_llvm-55d42003368c57d3a41c5f464d39b8440050d558.tar.gz external_llvm-55d42003368c57d3a41c5f464d39b8440050d558.tar.bz2 |
Recognize inline asm 'rev /bin/bash, ' as a bswap intrinsic call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/ARM/bswap-inline-asm.ll | 9 | ||||
-rw-r--r-- | test/CodeGen/X86/bswap-inline-asm.ll | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/CodeGen/ARM/bswap-inline-asm.ll b/test/CodeGen/ARM/bswap-inline-asm.ll new file mode 100644 index 0000000..472213d --- /dev/null +++ b/test/CodeGen/ARM/bswap-inline-asm.ll @@ -0,0 +1,9 @@ +; RUN: llc < %s -mtriple=arm-apple-darwin -mattr=+v6 | FileCheck %s + +define i32 @t1(i32 %x) nounwind { +; CHECK: t1: +; CHECK-NOT: InlineAsm +; CHECK: rev + %asmtmp = tail call i32 asm "rev $0, $1\0A", "=l,l"(i32 %x) nounwind + ret i32 %asmtmp +} diff --git a/test/CodeGen/X86/bswap-inline-asm.ll b/test/CodeGen/X86/bswap-inline-asm.ll index ecb4cec..3bb9124 100644 --- a/test/CodeGen/X86/bswap-inline-asm.ll +++ b/test/CodeGen/X86/bswap-inline-asm.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -march=x86-64 > %t -; RUN: not grep APP %t +; RUN: llc < %s -mtriple=x86_64-apple-darwin > %t +; RUN: not grep InlineAsm %t ; RUN: FileCheck %s < %t ; CHECK: foo: |