Index: src/compiler/move-optimizer.cc |
diff --git a/src/compiler/move-optimizer.cc b/src/compiler/move-optimizer.cc |
index 854f9c5d6a12825e1acaa0ee1d1363181bc8dbe4..96fca287ed25c42ee8674abf8534b3af87eab2ad 100644 |
--- a/src/compiler/move-optimizer.cc |
+++ b/src/compiler/move-optimizer.cc |
@@ -28,48 +28,20 @@ typedef ZoneMap<MoveKey, unsigned, MoveKeyCompare> MoveMap; |
typedef ZoneSet<InstructionOperand, CompareOperandModuloType> OperandSet; |
bool Blocks(const OperandSet& set, const InstructionOperand& operand) { |
- if (set.find(operand) != set.end()) return true; |
- // Only FP registers on archs with non-simple aliasing need extra checks. |
- if (!operand.IsFPRegister() || kSimpleFPAliasing) return false; |
+ if (!operand.IsFPRegister()) return set.find(operand) != set.end(); |
- // Check operand against operands of other FP types for interference. |
const LocationOperand& loc = LocationOperand::cast(operand); |
- MachineRepresentation rep = loc.representation(); |
- MachineRepresentation other_rep1, other_rep2; |
- switch (rep) { |
- case MachineRepresentation::kFloat32: |
- other_rep1 = MachineRepresentation::kFloat64; |
- other_rep2 = MachineRepresentation::kSimd128; |
- break; |
- case MachineRepresentation::kFloat64: |
- other_rep1 = MachineRepresentation::kFloat32; |
- other_rep2 = MachineRepresentation::kSimd128; |
- break; |
- case MachineRepresentation::kSimd128: |
- other_rep1 = MachineRepresentation::kFloat32; |
- other_rep2 = MachineRepresentation::kFloat64; |
- break; |
- default: |
- UNREACHABLE(); |
- break; |
- } |
- const RegisterConfiguration* config = RegisterConfiguration::Turbofan(); |
- int base = -1; |
- int aliases = config->GetAliases(rep, loc.register_code(), other_rep1, &base); |
- DCHECK(aliases > 0 || (aliases == 0 && base == -1)); |
- while (aliases--) { |
- if (set.find(LocationOperand(loc.kind(), loc.location_kind(), other_rep1, |
- base + aliases)) != set.end()) |
- return true; |
- } |
- aliases = config->GetAliases(rep, loc.register_code(), other_rep2, &base); |
- DCHECK(aliases > 0 || (aliases == 0 && base == -1)); |
- while (aliases--) { |
- if (set.find(LocationOperand(loc.kind(), loc.location_kind(), other_rep2, |
- base + aliases)) != set.end()) |
- return true; |
- } |
- return false; |
+ if (loc.representation() == MachineRepresentation::kFloat64) { |
+ return set.find(operand) != set.end() || |
+ set.find(LocationOperand(loc.kind(), loc.location_kind(), |
+ MachineRepresentation::kFloat32, |
+ loc.register_code())) != set.end(); |
+ } |
+ DCHECK_EQ(MachineRepresentation::kFloat32, loc.representation()); |
+ return set.find(operand) != set.end() || |
+ set.find(LocationOperand(loc.kind(), loc.location_kind(), |
+ MachineRepresentation::kFloat64, |
+ loc.register_code())) != set.end(); |
} |
int FindFirstNonEmptySlot(const Instruction* instr) { |