This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Fix modes in ctz libcall notes
Paolo Bonzini <bonzini@gnu.org> writes:
> Richard Sandiford wrote:
>> Paolo Bonzini <bonzini@gnu.org> writes:
>>>> - emit_libcall_block (insns, target, value,
>>>> - gen_rtx_fmt_e (unoptab->code, outmode, op0));
>>>> + eq_value = gen_rtx_fmt_e (unoptab->code, mode, op0);
>>>> + if (GET_MODE_SIZE (outmode) < GET_MODE_SIZE (mode))
>>>> + eq_value = gen_rtx_TRUNCATE (outmode, eq_value);
>>> Why not simplifying this so that a SUBREG is created instead?
>>
>> Having SUBREGs of anything other than MEMs and REGs seems less
>> than ideal. (For reference, we use TRUNCATEs for a similar
>> purpose when doing high-part multiplications.)
>
> My thought was that fwprop or CSE will probably create it anyway
> (because they simplify) and I just wondered whether having a more
> canonical representation would be better. However, you're right that
> the more canonical representation may be less ideal.
So you'd like to see rtl_hooks.gen_lowpart_no_emit instead?
Richard