diff options
author | Luís Marques <luismarques@lowrisc.org> | 2022-07-30 01:07:44 +0200 |
---|---|---|
committer | Luís Marques <luismarques@lowrisc.org> | 2022-07-31 23:19:00 +0200 |
commit | 260a64106854986a981e49ed87ee740460a23eb5 (patch) | |
tree | 17507ad1c18f015effdb838562092cf682ee7909 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 883fcccadaa08e0dbf5cbef7a38f00d520c305a8 (diff) | |
download | llvm-260a64106854986a981e49ed87ee740460a23eb5.zip llvm-260a64106854986a981e49ed87ee740460a23eb5.tar.gz llvm-260a64106854986a981e49ed87ee740460a23eb5.tar.bz2 |
[RISCV] Pre-RA expand pseudos pass
Expand load address pseudo-instructions earlier (pre-ra) to allow follow-up
patches to fold the addi of PseudoLLA instructions into the immediate
operand of load/store instructions.
Differential Revision: https://reviews.llvm.org/D123264
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index e92dec5..2321a27 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -630,6 +630,11 @@ bool MachineInstr::isIdenticalTo(const MachineInstr &Other, if (getDebugLoc() && Other.getDebugLoc() && getDebugLoc() != Other.getDebugLoc()) return false; + // If pre- or post-instruction symbols do not match then the two instructions + // are not identical. + if (getPreInstrSymbol() != Other.getPreInstrSymbol() || + getPostInstrSymbol() != Other.getPostInstrSymbol()) + return false; return true; } |