1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -mattr=+zimop -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefix=RV64ZIMOP
5 declare i64 @llvm.riscv.mopr.i64(i64 %a, i64 %b)
7 define i64 @mopr0_64(i64 %a) nounwind {
8 ; RV64ZIMOP-LABEL: mopr0_64:
10 ; RV64ZIMOP-NEXT: mop.r.0 a0, a0
12 %tmp = call i64 @llvm.riscv.mopr.i64(i64 %a, i64 0)
16 define i64 @mopr31_64(i64 %a) nounwind {
17 ; RV64ZIMOP-LABEL: mopr31_64:
19 ; RV64ZIMOP-NEXT: mop.r.31 a0, a0
21 %tmp = call i64 @llvm.riscv.mopr.i64(i64 %a, i64 31)
25 declare i64 @llvm.riscv.moprr.i64(i64 %a, i64 %b, i64 %c)
27 define i64 @moprr0_64(i64 %a, i64 %b) nounwind {
28 ; RV64ZIMOP-LABEL: moprr0_64:
30 ; RV64ZIMOP-NEXT: mop.rr.0 a0, a0, a1
32 %tmp = call i64 @llvm.riscv.moprr.i64(i64 %a, i64 %b, i64 0)
36 define i64 @moprr7_64(i64 %a, i64 %b) nounwind {
37 ; RV64ZIMOP-LABEL: moprr7_64:
39 ; RV64ZIMOP-NEXT: mop.rr.7 a0, a0, a1
41 %tmp = call i64 @llvm.riscv.moprr.i64(i64 %a, i64 %b, i64 7)
45 declare i32 @llvm.riscv.mopr.i32(i32 %a, i32 %b)
47 define signext i32 @mopr0_32(i32 signext %a) nounwind {
48 ; RV64ZIMOP-LABEL: mopr0_32:
50 ; RV64ZIMOP-NEXT: mop.r.0 a0, a0
51 ; RV64ZIMOP-NEXT: sext.w a0, a0
53 %tmp = call i32 @llvm.riscv.mopr.i32(i32 %a, i32 0)
57 define signext i32 @mopr31_32(i32 signext %a) nounwind {
58 ; RV64ZIMOP-LABEL: mopr31_32:
60 ; RV64ZIMOP-NEXT: mop.r.31 a0, a0
61 ; RV64ZIMOP-NEXT: sext.w a0, a0
63 %tmp = call i32 @llvm.riscv.mopr.i32(i32 %a, i32 31)
67 declare i32 @llvm.riscv.moprr.i32(i32 %a, i32 %b, i32 %c)
69 define signext i32 @moprr0_32(i32 signext %a, i32 signext %b) nounwind {
70 ; RV64ZIMOP-LABEL: moprr0_32:
72 ; RV64ZIMOP-NEXT: mop.rr.0 a0, a0, a1
73 ; RV64ZIMOP-NEXT: sext.w a0, a0
75 %tmp = call i32 @llvm.riscv.moprr.i32(i32 %a, i32 %b, i32 0)
79 define signext i32 @moprr7_32(i32 signext %a, i32 signext %b) nounwind {
80 ; RV64ZIMOP-LABEL: moprr7_32:
82 ; RV64ZIMOP-NEXT: mop.rr.7 a0, a0, a1
83 ; RV64ZIMOP-NEXT: sext.w a0, a0
85 %tmp = call i32 @llvm.riscv.moprr.i32(i32 %a, i32 %b, i32 7)