diff options
| author | 2024-10-01 17:06:24 +0100 | |
|---|---|---|
| committer | 2024-10-03 14:33:37 +0000 | |
| commit | 6cb63acdff440bb7573091e05d64b09cf0afda7c (patch) | |
| tree | abca3e1d0d620a67855c7931e563e5cc5c206022 /compiler/optimizing | |
| parent | 80a1feff174f5433e743836a6bf26356f4959256 (diff) | |
Avoid move to same registers.
We do always use ints as W registers.
Test: test.py
Change-Id: I9743edf2fd7bacba036b41fda42bdd539264a73c
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/code_generator_arm64.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index 42d955ef9e..ef2d67334a 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -6644,12 +6644,7 @@ void InstructionCodeGeneratorARM64::VisitTypeConversion(HTypeConversion* convers if (result_type == DataType::Type::kInt32 && input_type == DataType::Type::kInt64) { // 'int' values are used directly as W registers, discarding the top // bits, so we don't need to sign-extend and can just perform a move. - // We do not pass the `kDiscardForSameWReg` argument to force clearing the - // top 32 bits of the target register. We theoretically could leave those - // bits unchanged, but we would have to make sure that no code uses a - // 32bit input value as a 64bit value assuming that the top 32 bits are - // zero. - __ Mov(output.W(), source.W()); + __ Mov(output.W(), source.W(), kDiscardForSameWReg); } else if (DataType::IsUnsignedType(result_type) || (DataType::IsUnsignedType(input_type) && input_size < result_size)) { __ Ubfx(output, output.IsX() ? source.X() : source.W(), 0, result_size * kBitsPerByte); |