[PATCH] D77152: [SelectionDAG] Better legalization for FSHL and FSHR

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 01:36:55 PDT 2020


foad marked 2 inline comments as done.
foad added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1100-1101
+  // Amount has to be interpreted modulo the old bit width.
+  Amount =
+      DAG.getNode(ISD::UREM, DL, VT, Amount, DAG.getConstant(OldBits, DL, VT));
+
----------------
arsenm wrote:
> Should this maintain the special case for power of 2 (the GlobalISel version won't have the power of 2 urem combines for a while)
You mean generate AND explicitly instead of UREM? I don't think there's any need to do that. Something else in SelectionDAG cleans it up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77152





More information about the llvm-commits mailing list