[PATCH] D108058: [SelectionDAG] Optimize expansion for rotates/funnel shifts.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 14 10:48:51 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4248
+ // Expand to a pair of funnel shifts.
+ EVT NewShAmtVT = TLI.getShiftAmountTy(HalfVT, DAG.getDataLayout());
+ SDValue NewShAmt = DAG.getAnyExtOrTrunc(ShAmt, dl, NewShAmtVT);
----------------
This will pass "true" for the third operand, LegalTypes, which I think makes this call getScalarShiftAmountTy. X86 will always return MVT::i8. That won't be large enough for all valid shift amounts if you're splitting a 1024 bit funnel shift.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108058/new/
https://reviews.llvm.org/D108058
More information about the llvm-commits
mailing list