[PATCH] D111034: [AArch64] Optimize add/sub with immediate

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 3 20:10:28 PDT 2021


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:146
-
-  if (SubregToRegMI && !MRI->hasOneUse(SubregToRegMI->getOperand(0).getReg()))
     return false;
----------------
These code from line 122 - 146 will be used by both `visitAND` and `visitADDSUB`, so I moved them to a new function `AArch64MIPeepholeOpt::checkMovImmInstr` with little modification.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111034/new/

https://reviews.llvm.org/D111034



More information about the llvm-commits mailing list