Index: src/compiler/instruction.h |
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
index af7e592e5f93c4a0596c3c6d7b280c3160faca15..7130c3d53f3b9ea07a97aa9bf811506465037622 100644 |
--- a/src/compiler/instruction.h |
+++ b/src/compiler/instruction.h |
@@ -606,10 +606,17 @@ bool InstructionOperand::IsSimd128StackSlot() const { |
uint64_t InstructionOperand::GetCanonicalizedValue() const { |
if (IsAllocated() || IsExplicit()) { |
MachineRepresentation rep = LocationOperand::cast(this)->representation(); |
- // Preserve FP representation so we can check for interference on |
- // architectures with complex register aliasing. |
- MachineRepresentation canonical = |
- IsFPRegister() ? rep : MachineRepresentation::kNone; |
+ MachineRepresentation canonical = MachineRepresentation::kNone; |
+ if (IsFloatingPoint(rep)) { |
+ if (kSimpleFPAliasing) { |
+ // Archs with simple aliasing can treat all FP operands the same. |
+ canonical = MachineRepresentation::kFloat64; |
+ } else { |
+ // We need to distinguish FP operands of different reps when FP |
+ // aliasing is not simple (e.g. ARM). |
+ canonical = rep; |
+ } |
+ } |
return InstructionOperand::KindField::update( |
LocationOperand::RepresentationField::update(this->value_, canonical), |
LocationOperand::EXPLICIT); |
@@ -617,7 +624,6 @@ uint64_t InstructionOperand::GetCanonicalizedValue() const { |
return this->value_; |
} |
- |
// Required for maps that don't care about machine type. |
struct CompareOperandModuloType { |
bool operator()(const InstructionOperand& a, |