diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-10-28 14:07:44 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-10-28 14:07:44 +0000 |
| commit | d9189891fc8fb21b9513aaf1f56cae0c75e33bd8 (patch) | |
| tree | 42c22653dc453bc0dcf23514bdc2c77cf1d94443 | |
| parent | 8c043061e55859c82f119389ff58533c771b8596 (diff) | |
| download | bcm5719-llvm-d9189891fc8fb21b9513aaf1f56cae0c75e33bd8.tar.gz bcm5719-llvm-d9189891fc8fb21b9513aaf1f56cae0c75e33bd8.zip | |
[SelectionDAG] computeKnownBits - early-out if any BUILD_VECTOR element has no known bits
No need to check the remaining elements - no common known bits are available.
llvm-svn: 285399
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index e6b8d2f5ade..db6accfb628 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2042,6 +2042,10 @@ void SelectionDAG::computeKnownBits(SDValue Op, APInt &KnownZero, // TODO: support per-element known bits. KnownOne &= KnownOne2; KnownZero &= KnownZero2; + + // If we don't know any bits, early out. + if (!KnownOne && !KnownZero) + break; } break; case ISD::AND: |

