1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -mattr=+experimental-zbe -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefix=RV64ZBE
5 declare i32 @llvm.riscv.bcompress.i32(i32 %a, i32 %b)
7 define signext i32 @bcompress32(i32 signext %a, i32 signext %b) nounwind {
8 ; RV64ZBE-LABEL: bcompress32:
10 ; RV64ZBE-NEXT: bcompressw a0, a0, a1
12 %tmp = call i32 @llvm.riscv.bcompress.i32(i32 %a, i32 %b)
16 define signext i32 @bcompress32_demandedbits(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d) nounwind {
17 ; RV64ZBE-LABEL: bcompress32_demandedbits:
19 ; RV64ZBE-NEXT: add a0, a0, a1
20 ; RV64ZBE-NEXT: add a1, a2, a3
21 ; RV64ZBE-NEXT: bcompressw a0, a0, a1
25 %tmp = call i32 @llvm.riscv.bcompress.i32(i32 %e, i32 %f)
29 declare i32 @llvm.riscv.bdecompress.i32(i32 %a, i32 %b)
31 define signext i32 @bdecompress32(i32 signext %a, i32 signext %b) nounwind {
32 ; RV64ZBE-LABEL: bdecompress32:
34 ; RV64ZBE-NEXT: bdecompressw a0, a0, a1
36 %tmp = call i32 @llvm.riscv.bdecompress.i32(i32 %a, i32 %b)
40 define signext i32 @bdecompress32_demandedbits(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d) nounwind {
41 ; RV64ZBE-LABEL: bdecompress32_demandedbits:
43 ; RV64ZBE-NEXT: add a0, a0, a1
44 ; RV64ZBE-NEXT: add a1, a2, a3
45 ; RV64ZBE-NEXT: bdecompressw a0, a0, a1
49 %tmp = call i32 @llvm.riscv.bdecompress.i32(i32 %e, i32 %f)
53 declare i64 @llvm.riscv.bcompress.i64(i64 %a, i64 %b)
55 define i64 @bcompress64(i64 %a, i64 %b) nounwind {
56 ; RV64ZBE-LABEL: bcompress64:
58 ; RV64ZBE-NEXT: bcompress a0, a0, a1
60 %tmp = call i64 @llvm.riscv.bcompress.i64(i64 %a, i64 %b)
64 declare i64 @llvm.riscv.bdecompress.i64(i64 %a, i64 %b)
66 define i64 @bdecompress64(i64 %a, i64 %b) nounwind {
67 ; RV64ZBE-LABEL: bdecompress64:
69 ; RV64ZBE-NEXT: bdecompress a0, a0, a1
71 %tmp = call i64 @llvm.riscv.bdecompress.i64(i64 %a, i64 %b)