Skip to content

Commit 9181c31

Browse files
committed
Add assert for x86
1 parent 71533c5 commit 9181c31

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/X86/X86InstrInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ unsigned getNonNDVariant(unsigned Opc);
8787
/// e.g. turning COND_E to COND_NE.
8888
CondCode GetOppositeBranchCondition(CondCode CC) {
8989
// To reverse a condition it's necessary to only invert the low bit:
90+
assert(CC != COND_INVALID && "COND_INVALID has no inverse!");
9091
return static_cast<CondCode>(static_cast<unsigned>(CC) ^ 0x1);
9192
}
9293

0 commit comments

Comments
 (0)