Skip to content

Commit e6c1179

Browse files
committed
AArch64: Prefer w-regs for 32-bit move immediate
Prefer w-registers for 32-bit immediate moves. Add aarch64_output_move_imm() to emit a w-register if the immediate is a 32-bit unsigned value. gcc: * config/aarch64/aarch64.md (movdi_aarch64): Use aarch64_output_move_imm to select w-regs. * config/aarch64/aarch64.cc (aarch64_output_move_imm): New function. * config/aarch64/aarch64-protos.h (aarch64_output_move_imm): Add declaration. gcc/testsuite: * gcc.target/aarch64/acle/chkfeat-1.c: Update. * gcc.target/aarch64/acle/gcs-1.c: Update. * gcc.target/aarch64/acle/pr110100.c: Update. * gcc.target/aarch64/bitfield-bitint-abi-align16.c: Update. * gcc.target/aarch64/bitfield-bitint-abi-align8.c: Update. * gcc.target/aarch64/chkfeat-1.c: Update. * gcc.target/aarch64/chkfeat-2.c: Update. * gcc.target/aarch64/cmpbr.c: Update. * gcc.target/aarch64/eh_return-3.c: Update. * gcc.target/aarch64/gcspopm-1.c: Update. * gcc.target/aarch64/gcsss-1.c: Update. * gcc.target/aarch64/int_mov_immediate_1.c: Update. * gcc.target/aarch64/memset-corner-cases-2.c: Update. * gcc.target/aarch64/memset-corner-cases.c: Update. * gcc.target/aarch64/mops_1.c: Update. * gcc.target/aarch64/mops_2.c: Update. * gcc.target/aarch64/mops_3.c: Update. * gcc.target/aarch64/movk_3.c: Update. * gcc.target/aarch64/movtf_1.c: Update. * gcc.target/aarch64/movti_1.c: Update. * gcc.target/aarch64/noeffect9.c: Update. * gcc.target/aarch64/pr71727.c: Update. * gcc.target/aarch64/pr84882.c: Update. * gcc.target/aarch64/sme/locally_streaming_1.c: Update. * gcc.target/aarch64/sme/locally_streaming_1_nosve.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_b16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_b32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_b64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_b8.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_c16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_c32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_c64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilege_c8.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_b16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_b32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_b64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_b8.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_c16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_c32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_c64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilegt_c8.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_b16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_b32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_b64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_b8.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_c16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_c32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_c64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilele_c8.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_b16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_b32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_b64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_b8.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_c16.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_c32.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_c64.c: Update. * gcc.target/aarch64/sme2/acle-asm/whilelt_c8.c: Update. * gcc.target/aarch64/sve/acle/asm/cntb_pat.c: Update. * gcc.target/aarch64/sve/acle/asm/cntd_pat.c: Update. * gcc.target/aarch64/sve/acle/asm/cnth_pat.c: Update. * gcc.target/aarch64/sve/acle/asm/cntw_pat.c: Update. * gcc.target/aarch64/sve/acle/asm/dup_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/dup_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/dupq_f32.c: Update. * gcc.target/aarch64/sve/acle/asm/dupq_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/dupq_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/index_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/index_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1_gather_f32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1_gather_f64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sb_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sb_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sb_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sb_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sh_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sh_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sh_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sh_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sw_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1sw_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1ub_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1ub_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1ub_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1ub_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1uh_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1uh_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1uh_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1uh_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1uw_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ld1uw_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1_gather_f32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1_gather_f64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sb_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sb_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sb_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sb_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sh_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sh_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sh_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sh_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sw_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1sw_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1ub_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1ub_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1ub_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1ub_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1uh_gather_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1uh_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1uh_gather_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1uh_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1uw_gather_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/ldff1uw_gather_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/prfb_gather.c: Update. * gcc.target/aarch64/sve/acle/asm/prfd_gather.c: Update. * gcc.target/aarch64/sve/acle/asm/prfh_gather.c: Update. * gcc.target/aarch64/sve/acle/asm/prfw_gather.c: Update. * gcc.target/aarch64/sve/acle/asm/st1_scatter_f32.c: Update. * gcc.target/aarch64/sve/acle/asm/st1_scatter_f64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1_scatter_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/st1_scatter_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1_scatter_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/st1_scatter_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1b_scatter_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/st1b_scatter_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1b_scatter_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/st1b_scatter_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1h_scatter_s32.c: Update. * gcc.target/aarch64/sve/acle/asm/st1h_scatter_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1h_scatter_u32.c: Update. * gcc.target/aarch64/sve/acle/asm/st1h_scatter_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1w_scatter_s64.c: Update. * gcc.target/aarch64/sve/acle/asm/st1w_scatter_u64.c: Update. * gcc.target/aarch64/sve/acle/asm/whilele_b16.c: Update. * gcc.target/aarch64/sve/acle/asm/whilele_b32.c: Update. * gcc.target/aarch64/sve/acle/asm/whilele_b64.c: Update. * gcc.target/aarch64/sve/acle/asm/whilele_b8.c: Update. * gcc.target/aarch64/sve/acle/asm/whilelt_b16.c: Update. * gcc.target/aarch64/sve/acle/asm/whilelt_b32.c: Update. * gcc.target/aarch64/sve/acle/asm/whilelt_b64.c: Update. * gcc.target/aarch64/sve/acle/asm/whilelt_b8.c: Update. * gcc.target/aarch64/sve/acle/general/cntb_pat_1.c: Update. * gcc.target/aarch64/sve/acle/general/cntd_pat_1.c: Update. * gcc.target/aarch64/sve/acle/general/cnth_pat_1.c: Update. * gcc.target/aarch64/sve/acle/general/cntw_pat_1.c: Update. * gcc.target/aarch64/sve/acle/general/whilelt_5.c: Update. * gcc.target/aarch64/sve/const_2.c: Update. * gcc.target/aarch64/sve/const_3.c: Update. * gcc.target/aarch64/sve/noeffect9.c: Update. * gcc.target/aarch64/sve/pcs/stack_clash_1_2048.c: Update. * gcc.target/aarch64/sve/pcs/stack_clash_2.c: Update. * gcc.target/aarch64/sve/pcs/stack_clash_2_1024.c: Update. * gcc.target/aarch64/sve/pcs/stack_clash_2_128.c: Update. * gcc.target/aarch64/sve/pcs/stack_clash_2_2048.c: Update. * gcc.target/aarch64/sve/pcs/stack_clash_2_256.c: Update. * gcc.target/aarch64/sve/pcs/stack_clash_2_512.c: Update. * gcc.target/aarch64/sve/pcs/struct_3_128.c: Update. * gcc.target/aarch64/sve/pfalse-count_pred.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_bf16.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_f16.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_f32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_f64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_s16.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_s8.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_u16.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ld1q_gather_u8.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1_gather_f32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1_gather_f64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1_gather_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1_gather_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sb_gather_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sb_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sb_gather_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sb_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sh_gather_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sh_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sh_gather_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sh_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sw_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1sw_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1ub_gather_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1ub_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1ub_gather_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1ub_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1uh_gather_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1uh_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1uh_gather_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1uh_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1uw_gather_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/ldnt1uw_gather_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_bf16.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_f16.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_f32.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_f64.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_s16.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_s8.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_u16.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/st1q_scatter_u8.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1_scatter_f32.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1_scatter_f64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1_scatter_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1_scatter_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1_scatter_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1_scatter_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1b_scatter_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1b_scatter_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1b_scatter_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1b_scatter_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1h_scatter_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1h_scatter_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1h_scatter_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1h_scatter_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1w_scatter_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/stnt1w_scatter_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b16_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b32_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b64_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_b8_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_c16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_c32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_c64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilege_c8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b16_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b32_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b64_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_b8_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_c16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_c32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_c64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilegt_c8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_b16_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_b32_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_b64_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_b8_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_c16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_c32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_c64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilele_c8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_b16_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_b32_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_b64_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_b8_x2.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_c16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_c32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_c64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilelt_c8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_bf16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_f16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_f32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_f64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_mf8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_s16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_s8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_u16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilerw_u8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_bf16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_f16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_f32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_f64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_mf8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_s16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_s32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_s64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_s8.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_u16.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_u32.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_u64.c: Update. * gcc.target/aarch64/sve2/acle/asm/whilewr_u8.c: Update. * gcc.target/aarch64/test_frame_17.c: Update. * gcc.target/aarch64/vec-init-single-const.c: Update. * gcc.target/aarch64/vect-cse-codegen.c: Update.
1 parent e82be35 commit e6c1179

303 files changed

Lines changed: 2324 additions & 2317 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

gcc/config/aarch64/aarch64-protos.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ bool aarch64_use_simple_return_insn_p (void);
996996
const char *aarch64_output_casesi (rtx *);
997997
const char *aarch64_output_load_tp (rtx);
998998
const char *aarch64_output_sme_zero_za (rtx);
999+
const char *aarch64_output_move_imm (rtx);
9991000

10001001
arm_pcs aarch64_tlsdesc_abi_id ();
10011002
enum aarch64_symbol_type aarch64_classify_symbol (rtx, HOST_WIDE_INT);

gcc/config/aarch64/aarch64.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4916,6 +4916,12 @@ aarch64_move_imm (unsigned HOST_WIDE_INT val, machine_mode mode)
49164916
return aarch64_bitmask_imm (val);
49174917
}
49184918

4919+
/* Return the output string with the MOV instruction for immediate IMM. */
4920+
const char*
4921+
aarch64_output_move_imm (rtx imm)
4922+
{
4923+
return UINTVAL (imm) < 0x100000000 ? "mov\t%w0, %1" : "mov\t%x0, %1";
4924+
}
49194925

49204926
/* Return true is VAL is a move immediate that can be created by add/sub of the
49214927
12-bit shifted immediate VAL2. If GENERATE is true, emit the sequence. */

gcc/config/aarch64/aarch64.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@
18191819
[r, r ; mov_reg , * , 4] mov\t%x0, %x1
18201820
[k, r ; mov_reg , * , 4] mov\t%0, %x1
18211821
[r, k ; mov_reg , * , 4] mov\t%x0, %1
1822-
[r, O ; mov_imm , * , 4] << aarch64_is_mov_xn_imm (INTVAL (operands[1])) ? "mov\t%x0, %1" : "mov\t%w0, %1";
1822+
[r, O ; mov_imm , * , 4] << aarch64_output_move_imm (operands[1]);
18231823
[r, n ; mov_imm , * ,16] #
18241824
/* The "mov_imm" type for CNT is just a placeholder. */
18251825
[r, Usv ; mov_imm , sve , 4] << aarch64_output_sve_cnt_immediate ("cnt", "%x0", operands[1]);
@@ -2055,7 +2055,7 @@
20552055
[ r , m ; load_8 , * ] ldr\t%x0, %1
20562056
[ m , rY ; store_8 , * ] str\t%x1, %0
20572057
[ r , r ; mov_reg , * ] mov\t%x0, %x1
2058-
[ r , O ; fconstd , * ] << aarch64_is_mov_xn_imm (INTVAL (operands[1])) ? "mov\t%x0, %1" : "mov\t%w0, %1";
2058+
[ r , O ; fconstd , * ] << aarch64_output_move_imm (operands[1]);
20592059
}
20602060
)
20612061

gcc/testsuite/gcc.target/aarch64/acle/chkfeat-1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/*
99
** test_chkfeat:
1010
** ...
11-
** mov x16, 1
11+
** mov w16, 1
1212
** hint 40 // chkfeat x16
1313
** eor x0, x16, 1
1414
** ret

gcc/testsuite/gcc.target/aarch64/acle/gcs-1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test_gcspr ()
1818

1919
/*
2020
**test_gcspopm:
21-
** mov x0, 0
21+
** mov w0, 0
2222
** sysl x0, #3, c7, c7, #1 // gcspopm
2323
** ret
2424
*/
@@ -31,7 +31,7 @@ test_gcspopm ()
3131
/*
3232
**test_gcsss:
3333
** sys #3, c7, c7, #2, x0 // gcsss1
34-
** mov x0, 0
34+
** mov w0, 0
3535
** sysl x0, #3, c7, c7, #3 // gcsss2
3636
** ret
3737
*/

gcc/testsuite/gcc.target/aarch64/acle/pr110100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
void do_st64b(data512_t data) {
55
__arm_st64b((void*)0x10000000, data);
66
}
7-
/* { dg-final { scan-assembler {mov\tx([123])?[0-9], 268435456} } } */
7+
/* { dg-final { scan-assembler {mov\tw([123])?[0-9], 268435456} } } */

gcc/testsuite/gcc.target/aarch64/bitfield-bitint-abi-align16.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
** mov w0, w1
5858
** and x4, \1, 9223372036854775807
5959
** and x2, \1, 1
60-
** mov x3, 0
60+
** mov w3, 0
6161
** b f1
6262
*/
6363

@@ -67,7 +67,7 @@
6767
** mov w0, w1
6868
** and x4, \1, 9223372036854775807
6969
** and x2, \1, 1
70-
** mov x3, 0
70+
** mov w3, 0
7171
** b f8
7272
*/
7373
/*
@@ -76,7 +76,7 @@
7676
** mov w0, w1
7777
** and x4, \1, 9223372036854775807
7878
** and x2, \1, 1
79-
** mov x3, 0
79+
** mov w3, 0
8080
** b f16
8181
*/
8282

@@ -91,7 +91,7 @@
9191
** mov (w[0-9]+), 0
9292
** bfi \3, w\2, 0, 1
9393
** and x3, x\2, 9223372036854775807
94-
** mov x2, 0
94+
** mov w2, 0
9595
** str xzr, \[sp\]
9696
** strb \3, \[sp\]
9797
** ldr x1, \[sp\]
@@ -106,7 +106,7 @@
106106
** mov (w[0-9]+), w1
107107
** and x3, x0, 9223372036854775807
108108
** and x1, x0, 1
109-
** mov x2, 0
109+
** mov w2, 0
110110
** mov w0, \1
111111
** b f1p
112112
*/
@@ -115,7 +115,7 @@
115115
** mov (w[0-9]+), w1
116116
** and x3, x0, 9223372036854775807
117117
** and x1, x0, 1
118-
** mov x2, 0
118+
** mov w2, 0
119119
** mov w0, \1
120120
** b f8p
121121
*/
@@ -125,7 +125,7 @@
125125
** mov w0, w1
126126
** and x4, \1, 9223372036854775807
127127
** and x2, \1, 1
128-
** mov x3, 0
128+
** mov w3, 0
129129
** b f16p
130130
*/
131131

@@ -209,10 +209,10 @@
209209
** sxtw (x[0-9]+), w1
210210
** mov x0, \2
211211
** and x7, \2, 9223372036854775807
212-
** mov (x[0-9]+), 0
212+
** mov w([0-9]+), 0
213213
** sbfx (x[0-9]+), \1, 0, 63
214-
** bfi \3, \4, 0, 1
215-
** stp \3, xzr, \[sp, 16\]
214+
** bfi x\3, \4, 0, 1
215+
** stp x\3, xzr, \[sp, 16\]
216216
** mov x6, x7
217217
** mov x5, x7
218218
** mov x4, x7
@@ -234,10 +234,10 @@
234234
** sxtw (x[0-9]+), w1
235235
** mov x0, \2
236236
** and x7, \2, 9223372036854775807
237-
** mov (x[0-9]+), 0
237+
** mov w([0-9]+), 0
238238
** sbfx (x[0-9]+), \1, 0, 63
239-
** bfi \3, \4, 0, 1
240-
** stp \3, xzr, \[sp, 16\]
239+
** bfi x\3, \4, 0, 1
240+
** stp x\3, xzr, \[sp, 16\]
241241
** mov x6, x7
242242
** mov x5, x7
243243
** mov x4, x7
@@ -258,10 +258,10 @@
258258
** sxtw (x[0-9]+), w1
259259
** mov x0, \2
260260
** and (x[0-9]+), \2, 9223372036854775807
261-
** mov (x[0-9]+), 0
261+
** mov w([0-9]+), 0
262262
** sbfx (x[0-9]+), \1, 0, 63
263-
** bfi \4, \5, 0, 1
264-
** stp \4, xzr, \[sp, 16\]
263+
** bfi x\4, \5, 0, 1
264+
** stp x\4, xzr, \[sp, 16\]
265265
** mov x6, \3
266266
** mov x5, \3
267267
** mov x4, \3
@@ -323,15 +323,15 @@
323323
/*
324324
** g1_stdarg:
325325
** and x2, x0, 1
326-
** mov x3, 0
326+
** mov w3, 0
327327
** mov w0, w1
328328
** b f1_stdarg
329329
*/
330330

331331
/*
332332
** g16_stdarg:
333333
** and x2, x0, 1
334-
** mov x3, 0
334+
** mov w3, 0
335335
** mov w0, w1
336336
** b f16_stdarg
337337
*/
@@ -343,7 +343,7 @@
343343
** mov w0, w1
344344
** mov (w[0-9]+), 0
345345
** bfi \2, w\1, 0, 1
346-
** mov x2, 0
346+
** mov w2, 0
347347
** str xzr, \[sp\]
348348
** strb \2, \[sp\]
349349
** ldr x1, \[sp\]
@@ -356,7 +356,7 @@
356356
** mov (x[0-9]+), x0
357357
** mov w0, w1
358358
** and x1, \1, 1
359-
** mov x2, 0
359+
** mov w2, 0
360360
** b f1p_stdarg
361361
*/
362362

@@ -365,14 +365,14 @@
365365
** mov (x[0-9]+), x0
366366
** mov w0, w1
367367
** and x1, \1, 1
368-
** mov x2, 0
368+
** mov w2, 0
369369
** b f8p_stdarg
370370
*/
371371

372372
/*
373373
** g16p_stdarg:
374374
** and x2, x0, 1
375-
** mov x3, 0
375+
** mov w3, 0
376376
** mov w0, w1
377377
** b f16p_stdarg
378378
*/

gcc/testsuite/gcc.target/aarch64/bitfield-bitint-abi-align8.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
** mov (w[0-9]+), w1
5757
** and x3, x0, 9223372036854775807
5858
** and x1, x0, 1
59-
** mov x2, 0
59+
** mov w2, 0
6060
** mov w0, \1
6161
** b f1
6262
*/
@@ -66,7 +66,7 @@
6666
** mov (w[0-9]+), w1
6767
** and x3, x0, 9223372036854775807
6868
** and x1, x0, 1
69-
** mov x2, 0
69+
** mov w2, 0
7070
** mov w0, \1
7171
** b f8
7272
*/
@@ -76,7 +76,7 @@
7676
** mov w0, w1
7777
** and x4, \1, 9223372036854775807
7878
** and x2, \1, 1
79-
** mov x3, 0
79+
** mov w3, 0
8080
** b f16
8181
*/
8282

@@ -91,7 +91,7 @@
9191
** mov (w[0-9]+), 0
9292
** bfi \3, w\2, 0, 1
9393
** and x3, x\2, 9223372036854775807
94-
** mov x2, 0
94+
** mov w2, 0
9595
** str xzr, \[sp\]
9696
** strb \3, \[sp\]
9797
** ldr x1, \[sp\]
@@ -106,7 +106,7 @@
106106
** mov (w[0-9]+), w1
107107
** and x3, x0, 9223372036854775807
108108
** and x1, x0, 1
109-
** mov x2, 0
109+
** mov w2, 0
110110
** mov w0, \1
111111
** b f1p
112112
*/
@@ -115,7 +115,7 @@
115115
** mov (w[0-9]+), w1
116116
** and x3, x0, 9223372036854775807
117117
** and x1, x0, 1
118-
** mov x2, 0
118+
** mov w2, 0
119119
** mov w0, \1
120120
** b f8p
121121
*/
@@ -125,7 +125,7 @@
125125
** mov w0, w1
126126
** and x4, \1, 9223372036854775807
127127
** and x2, \1, 1
128-
** mov x3, 0
128+
** mov w3, 0
129129
** b f16p
130130
*/
131131

@@ -211,9 +211,9 @@
211211
** sxtw (x[0-9]+), w1
212212
** mov x0, \2
213213
** and x7, \2, 9223372036854775807
214-
** mov (x[0-9]+), 0
214+
** mov w([0-9]+), 0
215215
** sbfx (x[0-9]+), \1, 0, 63
216-
** bfi \3, \4, 0, 1
216+
** bfi x\3, \4, 0, 1
217217
** stp x7, x1, \[sp\]
218218
** mov x6, x7
219219
** mov x5, x7
@@ -235,9 +235,9 @@
235235
** sxtw (x[0-9]+), w1
236236
** mov x0, \2
237237
** and x7, \2, 9223372036854775807
238-
** mov (x[0-9]+), 0
238+
** mov w([0-9]+), 0
239239
** sbfx (x[0-9]+), \1, 0, 63
240-
** bfi \3, \4, 0, 1
240+
** bfi x\3, \4, 0, 1
241241
** stp x7, x1, \[sp\]
242242
** mov x6, x7
243243
** mov x5, x7
@@ -259,10 +259,10 @@
259259
** sxtw (x[0-9]+), w1
260260
** mov x0, \2
261261
** and x7, \2, 9223372036854775807
262-
** mov (x[0-9]+), 0
262+
** mov w([0-9]+), 0
263263
** sbfx (x[0-9]+), \1, 0, 63
264-
** bfi \3, \4, 0, 1
265-
** stp \3, xzr, \[sp, 16\]
264+
** bfi x\3, \4, 0, 1
265+
** stp x\3, xzr, \[sp, 16\]
266266
** mov x6, x7
267267
** mov x5, x7
268268
** mov x4, x7
@@ -326,14 +326,14 @@
326326
** mov (x[0-9]+), x0
327327
** mov w0, w1
328328
** and x1, \1, 1
329-
** mov x2, 0
329+
** mov w2, 0
330330
** b f1_stdarg
331331
*/
332332

333333
/*
334334
** g16_stdarg:
335335
** and x2, x0, 1
336-
** mov x3, 0
336+
** mov w3, 0
337337
** mov w0, w1
338338
** b f16_stdarg
339339
*/
@@ -345,7 +345,7 @@
345345
** mov w0, w1
346346
** mov (w[0-9]+), 0
347347
** bfi \2, w\1, 0, 1
348-
** mov x2, 0
348+
** mov w2, 0
349349
** str xzr, \[sp\]
350350
** strb \2, \[sp\]
351351
** ldr x1, \[sp\]
@@ -358,7 +358,7 @@
358358
** mov (x[0-9]+), x0
359359
** mov w0, w1
360360
** and x1, \1, 1
361-
** mov x2, 0
361+
** mov w2, 0
362362
** b f1p_stdarg
363363
*/
364364

@@ -367,14 +367,14 @@
367367
** mov (x[0-9]+), x0
368368
** mov w0, w1
369369
** and x1, \1, 1
370-
** mov x2, 0
370+
** mov w2, 0
371371
** b f8p_stdarg
372372
*/
373373

374374
/*
375375
** g16p_stdarg:
376376
** and x2, x0, 1
377-
** mov x3, 0
377+
** mov w3, 0
378378
** mov w0, w1
379379
** b f16p_stdarg
380380
*/

0 commit comments

Comments
 (0)