diff options
| author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-01-22 19:43:43 +0000 |
|---|---|---|
| committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-01-22 19:43:43 +0000 |
| commit | 6345b9ecfaf7b64434f9ec49d98d6763ea19d194 (patch) | |
| tree | 414cbc5bce2d6d88b7e2cbbfdb41f7f92934879e /llvm/lib | |
| parent | 98bfc82c39dacb76ad9422e84d5a98ccec4d6496 (diff) | |
| download | bcm5719-llvm-6345b9ecfaf7b64434f9ec49d98d6763ea19d194.tar.gz bcm5719-llvm-6345b9ecfaf7b64434f9ec49d98d6763ea19d194.zip | |
[AArch64] Assert that CCMP isel didn't fail inconsistently.
We verify that the op tree is eligible for CCMP emission in
isConjunctionDisjunctionTree, but it's also possible that
emitConjunctionDisjunctionTree fails later.
The initial check is useful, as it avoids building nodes
that will get discarded.
Still, make sure that inconsistencies don't happen with
an assert.
llvm-svn: 258532
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index c8e67ff8305..98cbbc01a57 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -1418,11 +1418,13 @@ static SDValue emitConjunctionDisjunctionTree(SelectionDAG &DAG, SDValue Val, AArch64CC::CondCode RHSCC; SDValue CmpR = emitConjunctionDisjunctionTree(DAG, RHS, RHSCC, PushNegate, CCOp, Predicate, Depth+1); + assert(CmpR && "Transform legality should have been checked already!"); if (NegateOperands && !PushNegate) RHSCC = AArch64CC::getInvertedCondCode(RHSCC); // Emit LHS. We must push the negate through if we need to negate it. SDValue CmpL = emitConjunctionDisjunctionTree(DAG, LHS, OutCC, NegateOperands, CmpR, RHSCC, Depth+1); + assert(CmpL && "Transform legality should have been checked already!"); // If we transformed an OR to and AND then we have to negate the result // (or absorb a PushNegate resulting in a double negation). if (Opcode == ISD::OR && !PushNegate) |

