Avoid explicitly branching to the false label on unordered when the condition
on the true branch will not catch the unordered case and let the code fall
through.
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/
794203003
Cr-Commit-Position: refs/heads/master@{#25787}
Label* flabel = branch->false_label;
switch (branch->condition) {
case kUnorderedEqual:
- __ b(vs, flabel);
- // Fall through.
+ // The "eq" condition will not catch the unordered case.
+ // The jump/fall through to false label will be used if the comparison
+ // was unordered.
case kEqual:
__ b(eq, tlabel);
break;
__ b(gt, tlabel);
break;
case kUnorderedLessThan:
- __ b(vs, flabel);
- // Fall through.
+ // The "lo" condition will not catch the unordered case.
+ // The jump/fall through to false label will be used if the comparison
+ // was unordered.
case kUnsignedLessThan:
__ b(lo, tlabel);
break;
__ b(hs, tlabel);
break;
case kUnorderedLessThanOrEqual:
- __ b(vs, flabel);
- // Fall through.
+ // The "ls" condition will not catch the unordered case.
+ // The jump/fall through to false label will be used if the comparison
+ // was unordered.
case kUnsignedLessThanOrEqual:
__ b(ls, tlabel);
break;
} else {
switch (condition) {
case kUnorderedEqual:
- __ B(vs, flabel);
- // Fall through.
+ // The "eq" condition will not catch the unordered case.
+ // The jump/fall through to false label will be used if the comparison
+ // was unordered.
case kEqual:
__ B(eq, tlabel);
break;
__ B(gt, tlabel);
break;
case kUnorderedLessThan:
- __ B(vs, flabel);
- // Fall through.
+ // The "lo" condition will not catch the unordered case.
+ // The jump/fall through to false label will be used if the comparison
+ // was unordered.
case kUnsignedLessThan:
__ B(lo, tlabel);
break;
__ B(hs, tlabel);
break;
case kUnorderedLessThanOrEqual:
- __ B(vs, flabel);
- // Fall through.
+ // The "ls" condition will not catch the unordered case.
+ // The jump/fall through to false label will be used if the comparison
+ // was unordered.
case kUnsignedLessThanOrEqual:
__ B(ls, tlabel);
break;