> -----Original Message-----
> From: H.J. Lu <[email protected]>
> Sent: Tuesday, August 25, 2026 3:55 PM
> To: Liu, Hongtao <[email protected]>
> Cc: GCC Patches <[email protected]>; Uros Bizjak
> <[email protected]>
> Subject: [v2 PATCH] x86: Improve truncsfbf tests
> 
> On Tue, Aug 25, 2026 at 3:34 PM Liu, Hongtao <[email protected]>
> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: H.J. Lu <[email protected]>
> > > Sent: Tuesday, August 25, 2026 10:30 AM
> > > To: GCC Patches <[email protected]>; Uros Bizjak
> > > <[email protected]>; Liu, Hongtao <[email protected]>
> > > Subject: [PATCH] x86: Improve truncsfbf tests
> > >
> > > Extract truncsfbf check into truncsfbf-check.h and remove duplicated
> > > codes in truncsfbf-2.c, runcsfbf-5.c and truncsfbf-6.c.
> >
> > *-check.h under gcc.target/i386 follows the style of main() + the ISA
> > runtime guard,.i.e Int Main (void) {
> >   #ifdef CHECK_CPU_SUPPORTS
> >    If (CHECK_CPU_SUPPORTS)
> > #endif
> >   do_test ();
> >   return 0;
> > }
> >
> > Could you follow the original conversion? Move main from those .c files into
> the check.h and define those .c as options + #define + include?
> 
> Fixed in v2.
> 
> > And should we fflsuh(stdout) before abort () or use fprintf instead printf
> since the buffer in printf may be throw way when aborted.
> 
> Used fprintf (stderr, in v2.
> 
> Here is the v2 patch.

Ok.
> 
> --
> H.J.
> --
> Move truncsfbf check into truncsfbf-check.h and remove duplicated codes in
> truncsfbf-2.c, runcsfbf-5.c and truncsfbf-6.c.
> 
> PR target/126933
> * gcc.target/i386/truncsfbf-2.c: Require sse2_runtime.
> Include "truncsfbf-check.h".
> * gcc.target/i386/truncsfbf-5.c (dg-options): Add -save-temps.
> (CHECK_CPU_SUPPORTS): New.
> (ATTRIBUTE): Likewise.
> Include "truncsfbf-check.h".
> Scan "\t{vex} vcvtneps2bf16".
> * gcc.target/i386/truncsfbf-6.c (dg-options): Add -save-temps.
> Include "truncsfbf-check.h".
> (CHECK_CPU_SUPPORTS): New.
> (ATTRIBUTE): Likewise.
> Scan "\tvcvtneps2bf16".
> * gcc.target/i386/truncsfbf-check.h: New file.

Reply via email to