[PATCH] D109963: [AArch64] Split bitmask immediate of bitwise AND operation
JinGu Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 04:01:18 PDT 2021
jaykang10 added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:129
+ // If mov instruction has one use, delete it.
+ if (MRI->hasOneUse(DefMI->getOperand(0).getReg()))
+ ToBeRemoved.push_back(DefMI);
----------------
dmgreen wrote:
> jaykang10 wrote:
> > dmgreen wrote:
> > > jaykang10 wrote:
> > > > dmgreen wrote:
> > > > > Should this transform be done with multiple uses on the mov?
> > > > I thought there could be other opportunities with two bitmask immediate and other bitwise operations like `OR`. If possible, I would like to keep the MOV for the potential opportunities.
> > > Yeah that might well happen. Do you have any tests? Maybe in an unrolled loop?
> > I do not have test cases yet. I could try to split the bitmask more later.
> I just think it's worth having some tests to show this is working as intended. Maybe where the other uses are transformed and where they are not. (Ignore the unrolled loop comment - it wouldn't trigger in a loop).
Let me add a simple test in which `and` and `or` use same constant.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109963/new/
https://reviews.llvm.org/D109963
More information about the llvm-commits
mailing list