[PATCH] D47156: [DAGCombiner] isAllOnesConstantOrAllOnesSplatConstant(): look through bitcasts
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 21 12:58:34 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:917
+ if (N.getOpcode() == ISD::BITCAST)
+ return isAllOnesConstantOrAllOnesSplatConstant(N.getOperand(0));
unsigned BitWidth = N.getScalarValueSizeInBits();
----------------
Don't make it recursive:
```
while (N.getOpcode() == ISD::BITCAST)
N = N->getOperand(0);
```
Repository:
rL LLVM
https://reviews.llvm.org/D47156
More information about the llvm-commits
mailing list