Skip to content

Commit d63ade6

Browse files
authored
[RISCV] Use DefaultAttrsIntrinsic for some vector intrinsics. (#94819)
This adds IntrWillReturn, IntrNoSync, IntrNoFree, and IntrNoCallback. The IntrWillReturn is needed to make the intrinsic eligible for being dead code eliminated if they are unused. We already use this for most intrinsics. I wonder if the rounding mode intrinsics were in review when the other intrinsics were changed to DefaultAttrsIntrinsic.
1 parent 18658db commit d63ade6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/include/llvm/IR/IntrinsicsRISCV.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ class RISCVVIntrinsic {
144144

145145
let TargetPrefix = "riscv" in {
146146
// We use anyint here but we only support XLen.
147-
def int_riscv_vsetvli : Intrinsic<[llvm_anyint_ty],
147+
def int_riscv_vsetvli : DefaultAttrsIntrinsic<[llvm_anyint_ty],
148148
/* AVL */ [LLVMMatchType<0>,
149149
/* VSEW */ LLVMMatchType<0>,
150150
/* VLMUL */ LLVMMatchType<0>],
151151
[IntrNoMem,
152152
ImmArg<ArgIndex<1>>,
153153
ImmArg<ArgIndex<2>>]>;
154-
def int_riscv_vsetvlimax : Intrinsic<[llvm_anyint_ty],
154+
def int_riscv_vsetvlimax : DefaultAttrsIntrinsic<[llvm_anyint_ty],
155155
/* VSEW */ [LLVMMatchType<0>,
156156
/* VLMUL */ LLVMMatchType<0>],
157157
[IntrNoMem,
@@ -669,7 +669,7 @@ let TargetPrefix = "riscv" in {
669669
// The destination vector type is the same as first source vector.
670670
// Input: (passthru, vector_in, vector_in/scalar_in, vxrm, vl)
671671
class RISCVSaturatingBinaryAAXUnMaskedRoundingMode
672-
: Intrinsic<[llvm_anyvector_ty],
672+
: DefaultAttrsIntrinsic<[llvm_anyvector_ty],
673673
[LLVMMatchType<0>, LLVMMatchType<0>, llvm_any_ty,
674674
llvm_anyint_ty, LLVMMatchType<2>],
675675
[ImmArg<ArgIndex<3>>, IntrNoMem]>, RISCVVIntrinsic {
@@ -692,7 +692,7 @@ let TargetPrefix = "riscv" in {
692692
// The destination vector type is the same as first source vector.
693693
// Input: (maskedoff, vector_in, vector_in/scalar_in, mask, vxrm, vl, policy)
694694
class RISCVSaturatingBinaryAAXMaskedRoundingMode
695-
: Intrinsic<[llvm_anyvector_ty],
695+
: DefaultAttrsIntrinsic<[llvm_anyvector_ty],
696696
[LLVMMatchType<0>, LLVMMatchType<0>, llvm_any_ty,
697697
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>, llvm_anyint_ty,
698698
LLVMMatchType<2>, LLVMMatchType<2>],

0 commit comments

Comments
 (0)