[llvm] [RISCV] Support XSfmm LLVM IR and CodeGen (PR #143069)
Brandon Wu via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 4 22:15:19 PDT 2025
================
@@ -180,4 +180,99 @@ let TargetPrefix = "riscv" in {
// XSfvfnrclipxfqf
defm int_riscv_sf_vfnrclip_x_f_qf : RISCVSFCustomVFNRCLIP;
defm int_riscv_sf_vfnrclip_xu_f_qf : RISCVSFCustomVFNRCLIP;
+
+ // XSfmm
+ // Output: (output_len)
+ // Input: (input_len, vsew, twiden)
+ class RISCVSFVSet
+ : DefaultAttrsIntrinsic<[llvm_anyint_ty],
+ [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
+ [ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>, IntrNoMem]>;
+
+ // Input: (tss, base, tn)
+ // IntrReadMem, IntrHasSideEffects does not work for pattern matching.
----------------
4vtomat wrote:
Oh I probably mean we don't use pattern matching here because IntrReadMem + IntrHasSideEffects doesn't work properly, it's eliminated during instruction selection.
I'll keep `IntrHasSideEffects` anyways lol
https://github.com/llvm/llvm-project/pull/143069
More information about the llvm-commits
mailing list