> -----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?
And should we fflsuh(stdout) before abort () or use fprintf instead printf
since the buffer in printf may be throw way when aborted.
>
> PR target/126933
> * gcc.target/i386/truncsfbf-2.c: Require sse2_runtime.
> Include "truncsfbf-check.h".
> (main): Call do_test ().
> * gcc.target/i386/truncsfbf-5.c (dg-options): Add -save-temps.
> (ATTRIBUTE): New.
> Include "truncsfbf-check.h".
> Scan "\t{vex} vcvtneps2bf16".
> * gcc.target/i386/truncsfbf-6.c (dg-options): Add -save-temps.
> (ATTRIBUTE): New.
> Include "truncsfbf-check.h".
> Scan "\tvcvtneps2bf16".
> * gcc.target/i386/truncsfbf-check.h: New file.
>
> --
> H.J.