| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| ; RUN: llc -mtriple=riscv32 -mattr=+zbc -verify-machineinstrs < %s \ |
| ; RUN: | FileCheck %s -check-prefix=RV32ZBC-ZBKC |
| ; RUN: llc -mtriple=riscv32 -mattr=+zbkc -verify-machineinstrs < %s \ |
| ; RUN: | FileCheck %s -check-prefix=RV32ZBC-ZBKC |
| |
| declare i32 @llvm.riscv.clmul.i32(i32 %a, i32 %b) |
| |
| define i32 @clmul32(i32 %a, i32 %b) nounwind { |
| ; RV32ZBC-ZBKC-LABEL: clmul32: |
| ; RV32ZBC-ZBKC: # %bb.0: |
| ; RV32ZBC-ZBKC-NEXT: clmul a0, a0, a1 |
| ; RV32ZBC-ZBKC-NEXT: ret |
| %tmp = call i32 @llvm.riscv.clmul.i32(i32 %a, i32 %b) |
| ret i32 %tmp |
| } |
| |
| declare i32 @llvm.riscv.clmulh.i32(i32 %a, i32 %b) |
| |
| define i32 @clmul32h(i32 %a, i32 %b) nounwind { |
| ; RV32ZBC-ZBKC-LABEL: clmul32h: |
| ; RV32ZBC-ZBKC: # %bb.0: |
| ; RV32ZBC-ZBKC-NEXT: clmulh a0, a0, a1 |
| ; RV32ZBC-ZBKC-NEXT: ret |
| %tmp = call i32 @llvm.riscv.clmulh.i32(i32 %a, i32 %b) |
| ret i32 %tmp |
| } |