1 ; RUN: llc -mtriple=arm64-eabi -fast-isel -fast-isel-abort=3 -mattr=+crc -o - %s | FileCheck %s
2 ; RUN: llc -mtriple=arm64-eabi -fast-isel -fast-isel-abort=3 -mattr=+v8r -o - %s | FileCheck %s
3 ; RUN: llc -mtriple=arm64-eabi -fast-isel -fast-isel-abort=3 -mcpu=cortex-a53 -mattr=+crc -o - %s | FileCheck %s
5 ; Note: tests are a copy of arm64-crc32.ll
7 define i32 @test_crc32b(i32 %cur, i32 %next) {
8 ; CHECK-LABEL: test_crc32b:
9 ; CHECK: crc32b w0, w0, w1
10 %val = call i32 @llvm.aarch64.crc32b(i32 %cur, i32 %next)
14 define i32 @test_crc32h(i32 %cur, i32 %next) {
15 ; CHECK-LABEL: test_crc32h:
16 ; CHECK: crc32h w0, w0, w1
17 %val = call i32 @llvm.aarch64.crc32h(i32 %cur, i32 %next)
21 define i32 @test_crc32w(i32 %cur, i32 %next) {
22 ; CHECK-LABEL: test_crc32w:
23 ; CHECK: crc32w w0, w0, w1
24 %val = call i32 @llvm.aarch64.crc32w(i32 %cur, i32 %next)
28 define i32 @test_crc32x(i32 %cur, i64 %next) {
29 ; CHECK-LABEL: test_crc32x:
30 ; CHECK: crc32x w0, w0, x1
31 %val = call i32 @llvm.aarch64.crc32x(i32 %cur, i64 %next)
35 define i32 @test_crc32cb(i32 %cur, i32 %next) {
36 ; CHECK-LABEL: test_crc32cb:
37 ; CHECK: crc32cb w0, w0, w1
38 %val = call i32 @llvm.aarch64.crc32cb(i32 %cur, i32 %next)
42 define i32 @test_crc32ch(i32 %cur, i32 %next) {
43 ; CHECK-LABEL: test_crc32ch:
44 ; CHECK: crc32ch w0, w0, w1
45 %val = call i32 @llvm.aarch64.crc32ch(i32 %cur, i32 %next)
49 define i32 @test_crc32cw(i32 %cur, i32 %next) {
50 ; CHECK-LABEL: test_crc32cw:
51 ; CHECK: crc32cw w0, w0, w1
52 %val = call i32 @llvm.aarch64.crc32cw(i32 %cur, i32 %next)
56 define i32 @test_crc32cx(i32 %cur, i64 %next) {
57 ; CHECK-LABEL: test_crc32cx:
58 ; CHECK: crc32cx w0, w0, x1
59 %val = call i32 @llvm.aarch64.crc32cx(i32 %cur, i64 %next)
63 declare i32 @llvm.aarch64.crc32b(i32, i32)
64 declare i32 @llvm.aarch64.crc32h(i32, i32)
65 declare i32 @llvm.aarch64.crc32w(i32, i32)
66 declare i32 @llvm.aarch64.crc32x(i32, i64)
68 declare i32 @llvm.aarch64.crc32cb(i32, i32)
69 declare i32 @llvm.aarch64.crc32ch(i32, i32)
70 declare i32 @llvm.aarch64.crc32cw(i32, i32)
71 declare i32 @llvm.aarch64.crc32cx(i32, i64)