On Tue, May 20, 2025 at 09:55:04PM GMT, Xi Ruoyao wrote:
> On Tue, 2025-05-20 at 15:44 +0200, Jakub Jelinek wrote:
> > > Specifically, the tests told me to extend (thought "truncate"
> > > was kind of an equivalent word) the output of left shift, plus/minus,
> > 
> > Truncation is the exact opposite of extension.
> > I can understand the need for handling of left shifts, for all the rest
> > I'd really like to see testcases.
> 
> I guess the terminology thing is caused by the past experience of the
> Loongson team with "a famous !TARGET_TRULY_NOOP_TRUNCATION target."  On
> that target truncsidi2 is a sign-extension as required by the ISA spec.
> 
> I'm trying to fix an ext-dce bug regarding !TARGET_TRULY_NOOP_TRUNCATION
> so I just decided to chime in and explain this :).
> 
> -- 
> Xi Ruoyao <xry...@xry111.site>
> School of Aerospace Science and Technology, Xidian University

Hi Ruoyao,

Thank you for this nice comment. I thought this wording was not really a big 
deal.

I used "truncation" because in the code of gimple-lower-bitint.cc, truncation
or down-casting is the first actual operation that needs to be done when
"info.extended" targets "extends" the output of some operations, which are
already in m_limb_type (mostly 64-bit integers).

This truncation exists for the "non-extended" targets, and seems also
necessary for the "extended" targets in some operations.

Again, it would be great if there is a more elegant way to get this done.

Yujie

Reply via email to