Revert "[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}"
Fails on arm due to missing vmrs op after vcmp. I revert this instead of pushing the fix because I don't understand yet why it compiles with run-test but not with dex2oat.
This reverts commit fd861249f31ab360c12dd1ffb131d50f02b0bfc6.
Change-Id: Idc2d30f6a0f39ddd3596aa18a532ae90f8aaf62f
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 28496e4..f562113 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -777,7 +777,7 @@
}
// Returns whether two instructions are equal, that is:
- // 1) They have the same type and contain the same data (InstructionDataEquals).
+ // 1) They have the same type and contain the same data,
// 2) Their inputs are identical.
bool Equals(HInstruction* other) const;
@@ -1363,45 +1363,28 @@
// Result is 0 if input0 == input1, 1 if input0 > input1, or -1 if input0 < input1.
class HCompare : public HBinaryOperation {
public:
- // The bias applies for floating point operations and indicates how NaN
- // comparisons are treated:
- enum Bias {
- kNoBias, // bias is not applicable (i.e. for long operation)
- kGtBias, // return 1 for NaN comparisons
- kLtBias, // return -1 for NaN comparisons
- };
-
- HCompare(Primitive::Type type, HInstruction* first, HInstruction* second, Bias bias)
- : HBinaryOperation(Primitive::kPrimInt, first, second), bias_(bias) {
+ HCompare(Primitive::Type type, HInstruction* first, HInstruction* second)
+ : HBinaryOperation(Primitive::kPrimInt, first, second) {
DCHECK_EQ(type, first->GetType());
DCHECK_EQ(type, second->GetType());
}
- int32_t Evaluate(int32_t x, int32_t y) const OVERRIDE {
+ virtual int32_t Evaluate(int32_t x, int32_t y) const OVERRIDE {
return
x == y ? 0 :
x > y ? 1 :
-1;
}
-
- int64_t Evaluate(int64_t x, int64_t y) const OVERRIDE {
+ virtual int64_t Evaluate(int64_t x, int64_t y) const OVERRIDE {
return
x == y ? 0 :
x > y ? 1 :
-1;
}
- bool InstructionDataEquals(HInstruction* other) const OVERRIDE {
- return bias_ == other->AsCompare()->bias_;
- }
-
- bool IsGtBias() { return bias_ == kGtBias; }
-
DECLARE_INSTRUCTION(Compare);
private:
- const Bias bias_;
-
DISALLOW_COPY_AND_ASSIGN(HCompare);
};