-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[RISCV] Use llvm_anyint_ty instead of llvm_any_ty for scalar intrinsics. NFC #154816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-llvm-ir Author: Craig Topper (topperc) ChangesFull diff: https://github.com/llvm/llvm-project/pull/154816.diff 2 Files Affected:
diff --git a/llvm/include/llvm/IR/IntrinsicsRISCV.td b/llvm/include/llvm/IR/IntrinsicsRISCV.td
index 243100f0c7180..c74cc3c04833a 100644
--- a/llvm/include/llvm/IR/IntrinsicsRISCV.td
+++ b/llvm/include/llvm/IR/IntrinsicsRISCV.td
@@ -80,11 +80,11 @@ let TargetPrefix = "riscv" in {
let TargetPrefix = "riscv" in {
class BitManipGPRIntrinsics
- : DefaultAttrsIntrinsic<[llvm_any_ty],
+ : DefaultAttrsIntrinsic<[llvm_anyint_ty],
[LLVMMatchType<0>],
[IntrNoMem, IntrSpeculatable]>;
class BitManipGPRGPRIntrinsics
- : DefaultAttrsIntrinsic<[llvm_any_ty],
+ : DefaultAttrsIntrinsic<[llvm_anyint_ty],
[LLVMMatchType<0>, LLVMMatchType<0>],
[IntrNoMem, IntrSpeculatable]>;
@@ -115,11 +115,11 @@ let TargetPrefix = "riscv" in {
// Zimop
def int_riscv_mopr
- : DefaultAttrsIntrinsic<[llvm_any_ty],
+ : DefaultAttrsIntrinsic<[llvm_anyint_ty],
[LLVMMatchType<0>, LLVMMatchType<0>],
[IntrNoMem, IntrSpeculatable, ImmArg<ArgIndex<1>>]>;
def int_riscv_moprr
- : DefaultAttrsIntrinsic<[llvm_any_ty],
+ : DefaultAttrsIntrinsic<[llvm_anyint_ty],
[LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
[IntrNoMem, IntrSpeculatable, ImmArg<ArgIndex<2>>]>;
} // TargetPrefix = "riscv"
@@ -135,7 +135,7 @@ defvar NoScalarOperand = 0xF;
defvar NoVLOperand = 0x1F;
class RISCVVIntrinsic {
- // These intrinsics may accept illegal integer values in their llvm_any_ty
+ // These intrinsics may accept illegal integer values in their llvm_anyint_ty
// operand, so they have to be extended.
Intrinsic IntrinsicID = !cast<Intrinsic>(NAME);
bits<4> ScalarOperand = NoScalarOperand;
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 4a1db80076530..ff625a8bcda30 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -1809,6 +1809,15 @@ bool RISCVTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
case Intrinsic::riscv_masked_atomicrmw_umax_i32:
case Intrinsic::riscv_masked_atomicrmw_umin_i32:
case Intrinsic::riscv_masked_cmpxchg_i32:
+ case Intrinsic::riscv_masked_atomicrmw_xchg_i64:
+ case Intrinsic::riscv_masked_atomicrmw_add_i64:
+ case Intrinsic::riscv_masked_atomicrmw_sub_i64:
+ case Intrinsic::riscv_masked_atomicrmw_nand_i64:
+ case Intrinsic::riscv_masked_atomicrmw_max_i64:
+ case Intrinsic::riscv_masked_atomicrmw_min_i64:
+ case Intrinsic::riscv_masked_atomicrmw_umax_i64:
+ case Intrinsic::riscv_masked_atomicrmw_umin_i64:
+ case Intrinsic::riscv_masked_cmpxchg_i64:
Info.opc = ISD::INTRINSIC_W_CHAIN;
Info.memVT = MVT::i32;
Info.ptrVal = I.getArgOperand(0);
|
lenary
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Looks like you stacked this, I'm only reviewing the changes to llvm/include/llvm/IR/IntrinsicsRISCV.td - I presume the atomic i64 changes are in another PR in my backlog.
Oops. I'll unstack it. |
No description provided.