In the latest version of llvm, I found that the old version of Intrinsic does not work.
def int_riscv_mvin : Intrinsic<[],[llvm_i64_ty, llvm_i64_ty]>
def: PatGprGpr<int_riscv_mvin, MVIN>;
error:
llvm/lib/Target/RISCV/RISCVInstrInfoBuddyExt.td:165:1: error: In anonymous_68739: Type cast can only have one type!
def: PatGprGpr<int_riscv_mvin, MVIN>;
^
def int_riscv_mvin : Intrinsic<[llvm_void_ty],[llvm_i64_ty, llvm_i64_ty]>;
def: PatGprGpr<int_riscv_mvin, MVIN>;
// It will report that
Type set is empty for each HW mode:
possible type contradiction in the pattern below (use -print-records with llvm-tblgen to see all expanded records).
anonymous_68740: (intrinsic_w_chain:{ *:[] m1:[] } 8075:{}, GPR:{ *:[i32] m1:[i64] }:$rs1, GPR:{ *:[i32] m1:[i64] }:$rs2)
Generated from record:
anonymous_68740 { // Pattern Pat PatGprGpr
dag PatternToMatch = (XLenVT (int_riscv_mvin GPR:$rs1, GPR:$rs2));
list<dag> ResultInstrs = [(MVIN GPR:$rs1, GPR:$rs2)];
list<Predicate> Predicates = [HasBuddyExt];
int AddedComplexity = 0;
}
I am a bit unable to understand this behavior and would be grateful if someone could help me.Thanks!