[PATCH] D65507: [MIPS GlobalISel] Fold load/store + G_GEP + G_CONSTANT
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 10:09:55 PDT 2019
atanasyan accepted this revision.
atanasyan added a comment.
This revision is now accepted and ready to land.
LGTM with a few nits.
================
Comment at: lib/Target/Mips/MipsInstructionSelector.cpp:333
+ MachineInstr *Offset = MRI.getVRegDef(Addr->getOperand(2).getReg());
+ if(Offset->getOpcode() == G_CONSTANT){
+ APInt OffsetValue = Offset->getOperand(1).getCImm()->getValue();
----------------
Add space after the `if`.
================
Comment at: lib/Target/Mips/MipsInstructionSelector.cpp:335
+ APInt OffsetValue = Offset->getOperand(1).getCImm()->getValue();
+ if(OffsetValue.isSignedIntN(16)){
+ BaseAddr = Addr->getOperand(1);
----------------
Ditto
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65507/new/
https://reviews.llvm.org/D65507
More information about the llvm-commits
mailing list