diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-07-13 09:39:00 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-07-13 09:39:00 +0000 |
| commit | 2dc42b7202572d858d9666ab4d5a27d8e46fa3a4 (patch) | |
| tree | ac90ce88468785ad5c9e9f08f4568494d7556970 /llvm/lib | |
| parent | 5ee68bcc2221fb78f88cf54f8e7c5bde4fd7fc63 (diff) | |
| download | bcm5719-llvm-2dc42b7202572d858d9666ab4d5a27d8e46fa3a4.tar.gz bcm5719-llvm-2dc42b7202572d858d9666ab4d5a27d8e46fa3a4.zip | |
Use isNullConstantOrNullSplatConstant helper. NFCI.
llvm-svn: 307895
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 71382c18fdf..8a1c09693b7 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3889,9 +3889,8 @@ SDValue DAGCombiner::visitAND(SDNode *N) { // Note: the SimplifyDemandedBits fold below can make an information-losing // transform, and then we have no way to find this better fold. if (N1C && N1C->isOne() && N0.getOpcode() == ISD::SUB) { - ConstantSDNode *SubLHS = isConstOrConstSplat(N0.getOperand(0)); - SDValue SubRHS = N0.getOperand(1); - if (SubLHS && SubLHS->isNullValue()) { + if (isNullConstantOrNullSplatConstant(N0.getOperand(0))) { + SDValue SubRHS = N0.getOperand(1); if (SubRHS.getOpcode() == ISD::ZERO_EXTEND && SubRHS.getOperand(0).getScalarValueSizeInBits() == 1) return SubRHS; |

