Kerry McLaughlin 6c53fb5dfe
[AArch64] Remove redundant fmovs when bitcasting from ext/trunc of bitcast (#175983)
The following can be used to reinterpret & extend a float, returning the
result as a double with the upper bits cleared:
  return bit_cast<double>((uint64_t)bit_cast<uint32_t>(x))

this currently results in two fmovs being generated, i.e.
  fmov    w8, s0
  fmov    d0, x8
  ret

This patch adds a pattern to improve this by using a single `fmov s0, s0`
instead, and also for the case where the integer value is truncated.
2026-01-19 14:37:18 +00:00
..

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.