[PATCH] D65607: [DAGCombiner] try to convert opposing shifts to casts

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 14:59:26 PDT 2019


lebedev.ri added a comment.

Looks good.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7624
+      N0.getOperand(0).getOpcode() == ISD::SHL &&
+      N0.getOperand(0).getOperand(1) == N1 && N0.getOperand(0).hasOneUse()) {
+    if (ConstantSDNode *AddC = isConstOrConstSplat(N0.getOperand(1))) {
----------------
Don't we also need for `N0` to be one-use?


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

https://reviews.llvm.org/D65607





More information about the llvm-commits mailing list