[PATCH] D112443: [SelectionDAG] Optimize expansion for rotates/funnel shifts

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 09:41:04 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4427
+  // Expand to a pair of funnel shifts.
+  EVT NewShAmtVT = TLI.getShiftAmountTy(HalfVT, DAG.getDataLayout(), false);
+  SDValue NewShAmt = DAG.getAnyExtOrTrunc(ShAmt, DL, NewShAmtVT);
----------------
Does passing "false" to this really solve the original problem I raised? That makes getShiftAmountTy use pointer type, but pointer type on some targets is i16 which wouldn't be enough to represent a shift amount for an i65356. Should this instead use the getShiftAmountTyForConstant helper? The name of that function is outdated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112443



More information about the llvm-commits mailing list