[PATCH] D79233: [ARM] Refactor lower to S[LR]I optimization

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 3 01:32:37 PDT 2020


dmgreen added a comment.

Thanks for the updates. Looks like it's picked up some new tricks since the last version.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:7991
+  } else {
+    ConstantSDNode *C1nodeImm = dyn_cast<ConstantSDNode>(And.getOperand(1));
+    ConstantSDNode *C1nodeShift = dyn_cast<ConstantSDNode>(And.getOperand(2));
----------------
Can you add a comment saying this reconstructs the immediate from the BIC


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:7994
+    assert(C1nodeImm && C1nodeShift);
+    C1 = C1nodeImm->getZExtValue() << C1nodeShift->getZExtValue();
+  }
----------------
I think if this used C1 = ~(C1nodeImm->getZExtValue() << C1nodeShift->getZExtValue()) here, then the IsAnd condition below can be removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79233





More information about the llvm-commits mailing list