[PATCH] D41643: [DAG] Fix for Bug PR34620 - Allow SimplifyDemandedBits to look through bitcasted constants
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 31 10:07:03 PST 2017
craig.topper 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);
----------------
RKSimon wrote:
> Would this catch more if we used isConstantOrConstantVector from DAGCombiner.cpp (we'd have to move it to SelectionDAG.h or similar)?
Why do we need to the constant qualifier at all? Isn't it generally useful to get any known bits from the other side of the bitcast?
https://reviews.llvm.org/D41643
More information about the llvm-commits
mailing list