[PATCH] D58210: [SelectionDAGLegalize] Improve promotion of CTLZ

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 09:04:17 PST 2019


arsenm added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:4155
+          NewAdd = DAG.getNode(ISD::ADD, dl, OVT, Add->getOperand(0),
+                          DAG.getConstant(C->getSExtValue() - Bits, dl, OVT));
+          ReplaceNode(SDValue(Add, 0), NewAdd);
----------------
Can you do the sub in APInt and avoid getSExtValue?


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

https://reviews.llvm.org/D58210





More information about the llvm-commits mailing list