This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/17972] const/pure functions result in bad asm
- 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: 13 Oct 2004 22:02:31 -0000
- Subject: [Bug rtl-optimization/17972] const/pure functions result in bad asm
- References: <20041013124723.17972.mostrows@watson.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-13 22:02 -------
-O1 -DBUG vs -O1 on "GCC: (GNU) 3.4.1 20040619 (prerelease)" is the same. Now with -fno-inline we
do get different asm but the asm is correct as current_thread_info is marked as const so we only call it
once.
Also smp_processor_id is not called at all at -O1 or -fno-inline -O1 because smp_processor_id is pure
since pure means it does not have any side effects.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17972