From 18a07d5c1702b661da76f5a4a9629971193872be Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Wed, 15 Nov 2023 07:02:03 +0000 Subject: [PATCH] [TargetInstrInfo][NFC] Don't restrict isAddImmediate description to physical registers None of the in-tree implementations have different behaviour for physical vs virtual registers, and it seems would work equally well if used with virtual registers. As such, perhaps it's simplest to just drop that part of the doc comment. --- llvm/include/llvm/CodeGen/TargetInstrInfo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/CodeGen/TargetInstrInfo.h b/llvm/include/llvm/CodeGen/TargetInstrInfo.h index 8e7499ac626a7..e188f226ac9f4 100644 --- a/llvm/include/llvm/CodeGen/TargetInstrInfo.h +++ b/llvm/include/llvm/CodeGen/TargetInstrInfo.h @@ -1060,9 +1060,9 @@ class TargetInstrInfo : public MCInstrInfo { } /// If the specific machine instruction is an instruction that adds an - /// immediate value and a physical register, and stores the result in - /// the given physical register \c Reg, return a pair of the source - /// register and the offset which has been added. + /// immediate value and a register, and stores the result in the given + /// register \c Reg, return a pair of the source register and the offset + /// which has been added. virtual std::optional isAddImmediate(const MachineInstr &MI, Register Reg) const { return std::nullopt;