diff options
author | Richard Osborne <richard@xmos.com> | 2011-05-31 14:47:36 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2011-05-31 14:47:36 +0000 |
commit | 7736c37c142f05f4ba53c52973658bf9abc6f4cc (patch) | |
tree | 0a9bf0cf5380665971b7efd60428b681c3aa0736 /test/CodeGen/XCore | |
parent | bc5fd67b53ba3bdc07bb5903094f6d9f6a7615b7 (diff) | |
download | external_llvm-7736c37c142f05f4ba53c52973658bf9abc6f4cc.zip external_llvm-7736c37c142f05f4ba53c52973658bf9abc6f4cc.tar.gz external_llvm-7736c37c142f05f4ba53c52973658bf9abc6f4cc.tar.bz2 |
Add XCore intrinsic for crc32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/XCore')
-rw-r--r-- | test/CodeGen/XCore/bitrev.ll | 9 | ||||
-rw-r--r-- | test/CodeGen/XCore/misc-intrinsics.ll | 17 |
2 files changed, 17 insertions, 9 deletions
diff --git a/test/CodeGen/XCore/bitrev.ll b/test/CodeGen/XCore/bitrev.ll deleted file mode 100644 index 9f0dc39..0000000 --- a/test/CodeGen/XCore/bitrev.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare i32 @llvm.xcore.bitrev(i32) - -define i32 @bitrev(i32 %val) { -; CHECK: bitrev: -; CHECK: bitrev r0, r0 - %result = call i32 @llvm.xcore.bitrev(i32 %val) - ret i32 %result -} diff --git a/test/CodeGen/XCore/misc-intrinsics.ll b/test/CodeGen/XCore/misc-intrinsics.ll new file mode 100644 index 0000000..0c68488 --- /dev/null +++ b/test/CodeGen/XCore/misc-intrinsics.ll @@ -0,0 +1,17 @@ +; RUN: llc < %s -march=xcore | FileCheck %s +declare i32 @llvm.xcore.bitrev(i32) +declare i32 @llvm.xcore.crc32(i32, i32, i32) + +define i32 @bitrev(i32 %val) { +; CHECK: bitrev: +; CHECK: bitrev r0, r0 + %result = call i32 @llvm.xcore.bitrev(i32 %val) + ret i32 %result +} + +define i32 @crc32(i32 %crc, i32 %data, i32 %poly) { +; CHECK: crc32: +; CHECK: crc32 r0, r1, r2 + %result = call i32 @llvm.xcore.crc32(i32 %crc, i32 %data, i32 %poly) + ret i32 %result +} |