https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119781

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Dimitri John Ledkov from comment #6)
> (In reply to Andrew Pinski from comment #3)
> > x86_64v2 is defined in the ABI:
> > https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9
> > 
> > And it includes sahf .
> 
> Yes, but it is a compiler choice if it is emitted. note that cpython code
> itself doesn't use sahf, it is generated by the compiler choice.

Are you sure you are compiling with -march=x86_64v2 there?
Also maybe it is a tuning thing. GCC might be tuned more towards AMD while LLVM
is tuned more towards Intel. But it does not mean LLVM might not produce the
instruction in some cases as I showed by my link to LLVM.

Again this is NOT a GCC bug but rather an user one.

Reply via email to