forked from OSchip/llvm-project
70 lines
1.7 KiB
LLVM
70 lines
1.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv32 -mattr=experimental-zbr -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck %s -check-prefix=RV32ZBR
|
|
|
|
declare i32 @llvm.riscv.crc32.b.i32(i32)
|
|
|
|
define i32 @crc32b(i32 %a) nounwind {
|
|
; RV32ZBR-LABEL: crc32b:
|
|
; RV32ZBR: # %bb.0:
|
|
; RV32ZBR-NEXT: crc32.b a0, a0
|
|
; RV32ZBR-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.crc32.b.i32(i32 %a)
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i32 @llvm.riscv.crc32.h.i32(i32)
|
|
|
|
define i32 @crc32h(i32 %a) nounwind {
|
|
; RV32ZBR-LABEL: crc32h:
|
|
; RV32ZBR: # %bb.0:
|
|
; RV32ZBR-NEXT: crc32.h a0, a0
|
|
; RV32ZBR-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.crc32.h.i32(i32 %a)
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i32 @llvm.riscv.crc32.w.i32(i32)
|
|
|
|
define i32 @crc32w(i32 %a) nounwind {
|
|
; RV32ZBR-LABEL: crc32w:
|
|
; RV32ZBR: # %bb.0:
|
|
; RV32ZBR-NEXT: crc32.w a0, a0
|
|
; RV32ZBR-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.crc32.w.i32(i32 %a)
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i32 @llvm.riscv.crc32c.b.i32(i32)
|
|
|
|
define i32 @crc32cb(i32 %a) nounwind {
|
|
; RV32ZBR-LABEL: crc32cb:
|
|
; RV32ZBR: # %bb.0:
|
|
; RV32ZBR-NEXT: crc32c.b a0, a0
|
|
; RV32ZBR-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.crc32c.b.i32(i32 %a)
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i32 @llvm.riscv.crc32c.h.i32(i32)
|
|
|
|
define i32 @crc32ch(i32 %a) nounwind {
|
|
; RV32ZBR-LABEL: crc32ch:
|
|
; RV32ZBR: # %bb.0:
|
|
; RV32ZBR-NEXT: crc32c.h a0, a0
|
|
; RV32ZBR-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.crc32c.h.i32(i32 %a)
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i32 @llvm.riscv.crc32c.w.i32(i32)
|
|
|
|
define i32 @crc32cw(i32 %a) nounwind {
|
|
; RV32ZBR-LABEL: crc32cw:
|
|
; RV32ZBR: # %bb.0:
|
|
; RV32ZBR-NEXT: crc32c.w a0, a0
|
|
; RV32ZBR-NEXT: ret
|
|
%tmp = call i32 @llvm.riscv.crc32c.w.i32(i32 %a)
|
|
ret i32 %tmp
|
|
}
|