[PATCH] D117957: [AVR] Remove unused register scavenger
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 06:15:51 PST 2022
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:796
- // Use a temporary register if src and dst registers are the same.
- if (DstReg == SrcReg)
- TmpReg = scavengeGPR8(MI);
-
- Register CurDstLoReg = (DstReg == SrcReg) ? TmpReg : DstLoReg;
- Register CurDstHiReg = (DstReg == SrcReg) ? TmpReg : DstHiReg;
+ assert(DstReg != SrcReg && "SrcReg and DstReg cannot be the same");
----------------
benshi001 wrote:
> I did not understand how this assert is guranteed for LPM/ELPM.
Do we need a constraint like `Constraints = "$src != $rd"` in the definition of LPM/ELPM to gurantee that ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117957/new/
https://reviews.llvm.org/D117957
More information about the llvm-commits
mailing list