This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/83133] Superflous x86 test instructions in generated assembly.
- From: "maxim.yegorushkin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Nov 2017 17:25:15 +0000
- Subject: [Bug target/83133] Superflous x86 test instructions in generated assembly.
- Auto-submitted: auto-generated
- References: <bug-83133-4@http.gcc.gnu.org/bugzilla/>
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?