diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-15 16:27:36 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-15 16:27:36 -0700 |
| commit | 61831806030612c3a8577d88945b478262ee88f7 (patch) | |
| tree | 2350f6effb4fae8dda05cdc7b97f5f945d2a3116 | |
| parent | ca10274fe34abad64dcbb20569aa5899bbf4c585 (diff) | |
YJIT: Eliminate unnecessary mov for trampolines (#7537)
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
| -rw-r--r-- | yjit/src/backend/ir.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yjit/src/backend/ir.rs b/yjit/src/backend/ir.rs index c2b6afd760..e27049ee33 100644 --- a/yjit/src/backend/ir.rs +++ b/yjit/src/backend/ir.rs @@ -1491,7 +1491,10 @@ impl Assembler { } pub fn load_into(&mut self, dest: Opnd, opnd: Opnd) { - self.push_insn(Insn::LoadInto { dest, opnd }); + match (dest, opnd) { + (Opnd::Reg(dest), Opnd::Reg(opnd)) if dest == opnd => {}, // skip if noop + _ => self.push_insn(Insn::LoadInto { dest, opnd }), + } } #[must_use] |
