[PATCH] D41643: [DAG] Fix for Bug PR34620 - Allow SimplifyDemandedBits to look through bitcasted constants

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 31 09:15:55 PST 2017


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1225
+    // do this on a recursive call where Known may be useful to the caller.
+    if (Depth > 0 && isConstOrConstSplat(Op.getOperand(0))) {
+      TLO.DAG.computeKnownBits(Op, Known, Depth);
----------------
Would this catch more if we used isConstantOrConstantVector from DAGCombiner.cpp (we'd have to move it to SelectionDAG.h or similar)?


https://reviews.llvm.org/D41643





More information about the llvm-commits mailing list