diff options
| author | 2016-01-12 14:01:41 +0000 | |
|---|---|---|
| committer | 2016-01-12 14:01:41 +0000 | |
| commit | 2f012576463c5bc3f59548bb7b5dfdd5cc89b2bc (patch) | |
| tree | 1c572d200ee0382b33d33e038b5b228b16c198c0 /compiler/optimizing/nodes.h | |
| parent | b8b040a2a8df2aa1239ac3c38563b5c114a6ba56 (diff) | |
| parent | a05cacc11fa075246c38497c01b949745fadc54b (diff) | |
Merge "Revert "Change condition to opposite if lhs is constant""
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index cfb71791f4..c06d164523 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2706,8 +2706,6 @@ class HCondition : public HBinaryOperation { bool IsGtBias() const { return bias_ == ComparisonBias::kGtBias; } - bool IsLtBias() const { return bias_ == ComparisonBias::kLtBias; } - void SetBias(ComparisonBias bias) { bias_ = bias; } bool InstructionDataEquals(HInstruction* other) const OVERRIDE { @@ -2717,23 +2715,13 @@ class HCondition : public HBinaryOperation { bool IsFPConditionTrueIfNaN() const { DCHECK(Primitive::IsFloatingPointType(InputAt(0)->GetType())); IfCondition if_cond = GetCondition(); - if (if_cond == kCondNE) { - return true; - } else if (if_cond == kCondEQ) { - return false; - } - return ((if_cond == kCondGT) || (if_cond == kCondGE)) && IsGtBias(); + return IsGtBias() ? ((if_cond == kCondGT) || (if_cond == kCondGE)) : (if_cond == kCondNE); } bool IsFPConditionFalseIfNaN() const { DCHECK(Primitive::IsFloatingPointType(InputAt(0)->GetType())); IfCondition if_cond = GetCondition(); - if (if_cond == kCondEQ) { - return true; - } else if (if_cond == kCondNE) { - return false; - } - return ((if_cond == kCondLT) || (if_cond == kCondLE)) && IsGtBias(); + return IsGtBias() ? ((if_cond == kCondLT) || (if_cond == kCondLE)) : (if_cond == kCondEQ); } private: |