This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][GCC][AArch64] optimize float immediate moves (1 /4) - infrastructure.
James Greenhalgh <james.greenhalgh@arm.com> writes:
>> +
>> + /* First determine number of instructions to do the move
>> + as an integer constant. */
>> + if (!aarch64_float_const_representable_p (x)
>> + && !aarch64_can_const_movi_rtx_p (x, mode)
>> + && aarch64_float_const_rtx_p (x))
>> + {
>> + unsigned HOST_WIDE_INT ival;
>> + bool succeed = aarch64_reinterpret_float_as_int (x, &ival);
>> + gcc_assert (succeed);
>
> Just:
>
> gcc_assert (aarch64_reinterpret_float_as_int (x, &ival));
>
> There's not much extra information in the name "succeed", so no extra value
> in the variable assignment.
That's not the same thing with --enable-checking=no
>> +
>> + machine_mode imode = mode == HFmode ? SImode : int_mode_for_mode (mode);
>> + int ncost = aarch64_internal_mov_immediate
>> + (NULL_RTX, gen_int_mode (ival, imode), false, imode);
>> + *cost += COSTS_N_INSNS (ncost);
>> + return true;
>> + }