[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
Mon Jan 1 04:01:28 PST 2018
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);
----------------
craig.topper wrote:
> 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?
+1 Removing the isConstOrConstSplat condition entirely unearths a number of other improvements to various tests.
https://reviews.llvm.org/D41643
More information about the llvm-commits
mailing list