[PATCH] D109528: [AArch64][GlobalISel] Add a new reassociation for G_PTR_ADDs.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 15:27:41 PDT 2021
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:4139-4146
+ LHSPtrAdd->moveBefore(&MI);
+ Register RHSReg = MI.getOffsetReg();
+ Observer.changingInstr(MI);
+ MI.getOperand(2).setReg(LHSCstOff);
+ Observer.changedInstr(MI);
+ Observer.changingInstr(*LHSPtrAdd);
+ LHSPtrAdd->getOperand(2).setReg(RHSReg);
----------------
Would it be cleaner to just insert a fresh instruction where it needs to be and let CSE deal with it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109528/new/
https://reviews.llvm.org/D109528
More information about the llvm-commits
mailing list