This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/45340] __builtin_expect and -Os generates stupid code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2010 19:12:33 -0000
- Subject: [Bug tree-optimization/45340] __builtin_expect and -Os generates stupid code
- References: <bug-45340-17114@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pinskia at gcc dot gnu dot org 2010-08-23 19:12 -------
jne .L6
jmp .L7
.L8:
#APP
# 18 "t.c" 1
#mem
# 0 "" 2
#NO_APP
.L6:
--- CUT ---
I added #mem inside the inline-asm which is empty and got the above code.
Which means that the inline-asm is adding an empty statement and GCC assumes
that all inline-asm contain at least something interesting. There is nothing
the compiler can do really.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45340