[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 10:22:52 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);
----------------
RKSimon wrote:
> craig.topper wrote:
> > 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.
> Sorry I missed that comment on the other phab
I'm working on a patch to fold getShiftAmountTyForConstant into TLI.getShiftAmountTy and then we'll never have to thing about this again.
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