[Bug target/83133] Superflous x86 test instructions in generated assembly.

maxim.yegorushkin at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 24 17:25:00 GMT 2017


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

--- Comment #12 from Maxim Egorushkin <maxim.yegorushkin at gmail dot com> ---
(In reply to joseph@codesourcery.com from comment #7)
> On Fri, 24 Nov 2017, maxim.yegorushkin at gmail dot com wrote:
> 
> > This code underflows a signed integer, which is undefined behaviour, if I am
> > not mistaken. So, this would not be a valid example, would it?
> 
> It's valid to call a function in another file compiled with another 
> compiler that follows the ABI, or compiled with -fwrapv, or not written in 
> C at all.

That amounts to saying that the extra test instruction should only be emitted
when compiling with -fwrapv. Is that right?


More information about the Gcc-bugs mailing list