[PATCH] D138529: [AVR] Optimize constant 32-bit shifts
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 02:30:05 PST 2022
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:1963
+ Register Out = MRI.createVirtualRegister(&AVR::GPR8RegClass);
+ BuildMI(*BB, MI, dl, TII.get(AVR::COPY), Out).addReg(AVR::R1);
+ Regs[Regs.size() - 1] = std::pair(Out, 0);
----------------
How about using `GetZeroRegister()` instead of fixed `AVR::R1`? This way should also fit avrtiny. Or we can emit `eor Rx, Rx` instead of `mov Rx, Zero` .
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138529/new/
https://reviews.llvm.org/D138529
More information about the llvm-commits
mailing list