Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Commit 5156091

Browse files
committed
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258532 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent fcb3ff9 commit 5156091

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Target/AArch64/AArch64ISelLowering.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1418,11 +1418,13 @@ static SDValue emitConjunctionDisjunctionTree(SelectionDAG &DAG, SDValue Val,
14181418
AArch64CC::CondCode RHSCC;
14191419
SDValue CmpR = emitConjunctionDisjunctionTree(DAG, RHS, RHSCC, PushNegate,
14201420
CCOp, Predicate, Depth+1);
1421+
assert(CmpR && "Transform legality should have been checked already!");
14211422
if (NegateOperands && !PushNegate)
14221423
RHSCC = AArch64CC::getInvertedCondCode(RHSCC);
14231424
// Emit LHS. We must push the negate through if we need to negate it.
14241425
SDValue CmpL = emitConjunctionDisjunctionTree(DAG, LHS, OutCC, NegateOperands,
14251426
CmpR, RHSCC, Depth+1);
1427+
assert(CmpL && "Transform legality should have been checked already!");
14261428
// If we transformed an OR to and AND then we have to negate the result
14271429
// (or absorb a PushNegate resulting in a double negation).
14281430
if (Opcode == ISD::OR && !PushNegate)

0 commit comments

Comments
 (0)