[PATCH] D47156: [DAGCombiner] isAllOnesConstantOrAllOnesSplatConstant(): look through bitcasts
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 21 13:27:23 PDT 2018
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:916
static bool isAllOnesConstantOrAllOnesSplatConstant(SDValue N) {
+ while (N.getOpcode() == ISD::BITCAST)
+ N = N->getOperand(0);
----------------
spatel wrote:
> Use peekThroughBitcast()
>
>
> Should we do the same for isOneConstantOrOneSplatConstant and isNullConstantOrNullSplatConstant?
Let's leave it until there is a test case - you can add TODO comments if you wish.
Repository:
rL LLVM
https://reviews.llvm.org/D47156
More information about the llvm-commits
mailing list