[PATCH] DAGCombiner: Continue combining if FoldConstantArithmetic() fails.

hfinkel at anl.gov hfinkel at anl.gov
Wed May 20 09:41:41 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1600
@@ +1599,3 @@
+/// ContantSDNode pointer else nullptr.
+static ConstantSDNode *asNonOpaqueConstant(SDValue N) {
+  ConstantSDNode *Const = dyn_cast<ConstantSDNode>(N);
----------------
Our general convention seems to be to name functions like this 'getAs<Name>', not 'as<Name>', so I think getAsNonOpaqueConstant would be better.

Otherwise, LGTM.

http://reviews.llvm.org/D6946

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list