[PATCH] D56474: [ARM] [NEON] Add ROTR/ROTL lowering

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 14 18:35:52 PST 2019


efriedma added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:8048
+  if (!ShiftKnown.isConstant()) {
+    // Normal shift-shift-or, we don't have a constant.
+    Value1 = DAG.getNode(Left ? ISD::SHL : ISD::SRL, DL, VT, Value1, Amount);
----------------
You can just `return SDValue();` here, rather than explicitly expand it.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:8055
+
+  const uint64_t Shift = ShiftKnown.getConstant().getLimitedValue(129);
+  if (Shift == 0) {
----------------
The shift amount is modulo the size of the elements.


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

https://reviews.llvm.org/D56474





More information about the llvm-commits mailing list