1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+experimental-b -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefix=RV32B
4 ; RUN: llc -mtriple=riscv32 -mattr=+experimental-zbc -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s -check-prefix=RV32BC
7 declare i32 @llvm.riscv.clmul.i32(i32 %a, i32 %b)
9 define i32 @clmul32(i32 %a, i32 %b) nounwind {
10 ; RV32B-LABEL: clmul32:
12 ; RV32B-NEXT: clmul a0, a0, a1
15 ; RV32BC-LABEL: clmul32:
17 ; RV32BC-NEXT: clmul a0, a0, a1
19 %tmp = call i32 @llvm.riscv.clmul.i32(i32 %a, i32 %b)
23 declare i32 @llvm.riscv.clmulh.i32(i32 %a, i32 %b)
25 define i32 @clmul32h(i32 %a, i32 %b) nounwind {
26 ; RV32B-LABEL: clmul32h:
28 ; RV32B-NEXT: clmulh a0, a0, a1
31 ; RV32BC-LABEL: clmul32h:
33 ; RV32BC-NEXT: clmulh a0, a0, a1
35 %tmp = call i32 @llvm.riscv.clmulh.i32(i32 %a, i32 %b)
39 declare i32 @llvm.riscv.clmulr.i32(i32 %a, i32 %b)
41 define i32 @clmul32r(i32 %a, i32 %b) nounwind {
42 ; RV32B-LABEL: clmul32r:
44 ; RV32B-NEXT: clmulr a0, a0, a1
47 ; RV32BC-LABEL: clmul32r:
49 ; RV32BC-NEXT: clmulr a0, a0, a1
51 %tmp = call i32 @llvm.riscv.clmulr.i32(i32 %a, i32 %b)