This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #11 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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]