diff options
author | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2022-12-05 10:49:25 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2022-12-06 20:27:25 +0000 |
commit | ba1536dac780f3f92c5eab999fda6931f6247fc1 (patch) | |
tree | fa2f3d8d88c30e204aeb396cd772d94efd71282e /libcpp | |
parent | 710c9676520dfd38b4bfdcc937ce026ed89921d6 (diff) | |
download | gcc-ba1536dac780f3f92c5eab999fda6931f6247fc1.zip gcc-ba1536dac780f3f92c5eab999fda6931f6247fc1.tar.gz gcc-ba1536dac780f3f92c5eab999fda6931f6247fc1.tar.bz2 |
AArch64: Cleanup move immediate code
Simplify, refactor and improve various move immediate functions.
Allow 32-bit MOVN/I as a valid 64-bit immediate which removes special
cases in aarch64_internal_mov_immediate. Add new constraint so the movdi
pattern only needs a single alternative for move immediate.
gcc/
* config/aarch64/aarch64.cc (aarch64_bitmask_imm): Use unsigned type.
(aarch64_is_mov_xn_imm): New function.
(aarch64_move_imm): Refactor, assert mode is SImode or DImode.
(aarch64_internal_mov_immediate): Assert mode is SImode or DImode.
Simplify special cases.
(aarch64_uimm12_shift): Simplify code.
(aarch64_clamp_to_uimm12_shift): Likewise.
(aarch64_movw_imm): Rename to aarch64_is_movz.
(aarch64_float_const_rtx_p): Pass either SImode or DImode to
aarch64_internal_mov_immediate.
(aarch64_rtx_costs): Likewise.
* config/aarch64/aarch64.md (movdi_aarch64): Merge 'N' and 'M'
constraints into single 'O'.
(mov<mode>_aarch64): Likewise.
* config/aarch64/aarch64-protos.h (aarch64_move_imm): Use unsigned.
(aarch64_bitmask_imm): Likewise.
(aarch64_uimm12_shift): Likewise.
(aarch64_is_mov_xn_imm): New prototype.
* config/aarch64/constraints.md: Add 'O' for 32/64-bit immediates,
limit 'N' to 64-bit only moves.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions