Skip to content

Commit 71533c5

Browse files
committed
Fix concerns
1 parent d506a73 commit 71533c5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/Target/ARM/Utils/ARMBaseInfo.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ enum CondCodes { // Meaning (integer) Meaning (floating-point)
4747

4848
inline static CondCodes getOppositeCondition(CondCodes CC) {
4949
// To reverse a condition it's necessary to only invert the low bit:
50-
50+
// Note that unlike in AArch64, flipping the bottom bit for AL is not a valid
51+
// predicate.
52+
assert(CC != AL && "AL has no opposite condition");
5153
return static_cast<CondCodes>(static_cast<unsigned>(CC) ^ 0x1);
5254
}
5355

llvm/lib/Target/X86/X86InstrInfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ 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-
9190
return static_cast<CondCode>(static_cast<unsigned>(CC) ^ 0x1);
9291
}
9392

0 commit comments

Comments
 (0)