File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed
llvm/lib/Target/ARM/Utils Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -46,23 +46,9 @@ enum CondCodes { // Meaning (integer) Meaning (floating-point)
4646};
4747
4848inline static CondCodes getOppositeCondition (CondCodes CC) {
49- switch (CC) {
50- default : llvm_unreachable (" Unknown condition code" );
51- case EQ: return NE;
52- case NE: return EQ;
53- case HS: return LO;
54- case LO: return HS;
55- case MI: return PL;
56- case PL: return MI;
57- case VS: return VC;
58- case VC: return VS;
59- case HI: return LS;
60- case LS: return HI;
61- case GE: return LT;
62- case LT: return GE;
63- case GT: return LE;
64- case LE: return GT;
65- }
49+ // To reverse a condition it's necessary to only invert the low bit:
50+
51+ return static_cast <CondCodes>(static_cast <unsigned >(CC) ^ 0x1 );
6652}
6753
6854// / getSwappedCondition - assume the flags are set by MI(a,b), return
You can’t perform that action at this time.
0 commit comments