This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR84986
On Tue, 20 Mar 2018, Jakub Jelinek wrote:
> On Tue, Mar 20, 2018 at 11:41:01AM +0100, Richard Biener wrote:
> > If the precision matches the mode maybe. But I thought we try to
> > avoid using %al (HImode) or %ax (QImode) operands in the end?
>
> Yes, but we try to do that only on the level of the emitted assembly,
> sometimes we simply emit a QImode or HImode instruction that does
> movl %eax, %ebx
> and similar. That is also zero cost compared to what it would cost to do it
> in SImode.
Sure - but that doesn't actually truncate?
That said, even sign-conversions might cost sth like unsigned HImode
to signed HImode might end up doing a HI->SImode sign-extension to
have the reg in promoted form.
Richard.