[PATCH] D92174: [VE] Optimize emitSPAdjustment function
Kazushi Marukawa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 27 03:37:19 PST 2020
kaz7 added inline comments.
================
Comment at: llvm/lib/Target/VE/VEFrameLowering.cpp:231
+ if (NumBytes == 0) {
+ // Nothin to do here.
+ } else if (isInt<7>(NumBytes)) {
----------------
simoll wrote:
> typo: Nothing
Thanks.
================
Comment at: llvm/lib/Target/VE/VEFrameLowering.cpp:232-243
+ } else if (isInt<7>(NumBytes)) {
+ // adds.l %s11, NumBytes at lo, %s11
BuildMI(MBB, MBBI, DL, TII.get(VE::ADDSLri), VE::SX11)
.addReg(VE::SX11)
.addImm(NumBytes);
- return;
+ } else if (isInt<32>(NumBytes)) {
+ // lea %s11, NumBytes at lo(, %s11)
----------------
simoll wrote:
> Consider factoring this into a separate "`LoadImm`" function.
This is "addImmediate" to SP and need to specify clobber register also. I think it is not general instructions as you expected.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92174/new/
https://reviews.llvm.org/D92174
More information about the llvm-commits
mailing list