[PATCH] D22726: [DAGCombine] Match shift amount by value rather than relying on common sub-expressions.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 10:17:39 PDT 2016
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4941
+
+ if (!fold && isa<ConstantSDNode>(N0.getOperand(1))) {
+ APInt c1 = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
----------------
Change to use isConstOrConstSplat if you can.
Repository:
rL LLVM
https://reviews.llvm.org/D22726
More information about the llvm-commits
mailing list