[PATCH] D109963: [AArch64] Split bitmask immediate of bitwise AND operation

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 24 03:43:53 PDT 2021


dmgreen 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);
----------------
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).


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

https://reviews.llvm.org/D109963



More information about the llvm-commits mailing list