[PATCH] D130862: [LegalizeTypes] Improve splitting for urem by constant for some constants.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 08:16:42 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4543
+  // Try to expand UREM by constant.
+  if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N->getOperand(1))) {
+    EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
----------------
RKSimon wrote:
> RKSimon wrote:
> > auto *CN
> Is it possible to support constant splat vectors as well?
This function is only called for scalar integers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130862



More information about the llvm-commits mailing list