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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 08:00:31 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4241
+  SDValue Cond = DAG.getSetCC(dl, ShAmtCCVT, AndNode,
+                              DAG.getConstant(0, dl, ShAmtVT), ISD::SETNE);
+
----------------
If you make this condition SETEQ or SETNE depending on whether it's a left or right shift...


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4247
+
+  if (N->getOpcode() == ISD::FSHL) {
+    SDValue Select2, Select3, Select4;
----------------
... then you can completely common up the two branches of this "if".


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