[PATCH] D118765: [DAGCombiner] Fold SSHLSAT/USHLSAT to SHL when no saturation will occur

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 05:08:49 PST 2022


bjope added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9371
+      DAG.ComputeNumSignBits(N0) > N1C->getZExtValue())
+    return DAG.getNode(ISD::SHL, SDLoc(N), VT, N0, N1);
+
----------------
Maybe I need to check that the SHL is legal/custom (unless this is before legalization).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118765



More information about the llvm-commits mailing list