public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set
@ 2005-05-15 17:50 steven at gcc dot gnu dot org
2005-05-15 18:05 ` [Bug target/21588] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-05-15 17:50 UTC (permalink / raw)
To: gcc-bugs
Consider this snippet:
typedef float v4sf __attribute__ ((vector_size (16)));
float global;
float
waste_global (float p[4])
{
__builtin_ia32_loadups (p);
global += 1.0;
}
GCC now thinks __builtin_ia32_loadups clobbers global:
waste_global (pD.1564)
{
floatD.28 D.1568;
floatD.28 global.0D.1567;
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
# globalD.1563_6 = V_MAY_DEF <globalD.1563_2>;
__builtin_ia32_loadups (pD.1564_1);
# VUSE <globalD.1563_6>;
global.0D.1567_3 = globalD.1563;
D.1568_4 = global.0D.1567_3 + 1.0e+0;
# globalD.1563_5 = V_MUST_DEF <globalD.1563_6>;
globalD.1563 = D.1568_4;
return;
# SUCC: EXIT [100.0%]
}
This is a bit silly, if we encourage people to use builtins instead
of inline assembly.
--
Summary: x86 machine builtins do not have any const/pure
attributes set
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steven at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,hubicka at gcc dot gnu
dot org,rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
@ 2005-05-15 18:05 ` pinskia at gcc dot gnu dot org
2005-05-16 18:14 ` rth at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-15 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-15 18:05 -------
Confirmed, I cannot remember or not if the rs6000/altivec builtins were fixed or not.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC target triplet| |i?86-*-*, x86_64-*-*
Last reconfirmed|0000-00-00 00:00:00 |2005-05-15 18:05:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
2005-05-15 18:05 ` [Bug target/21588] " pinskia at gcc dot gnu dot org
@ 2005-05-16 18:14 ` rth at gcc dot gnu dot org
2005-07-28 21:26 ` rth at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-05-16 18:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-05-16 18:14 -------
True. I remember trying this, though, and in practice all it did was increase
register pressure.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
2005-05-15 18:05 ` [Bug target/21588] " pinskia at gcc dot gnu dot org
2005-05-16 18:14 ` rth at gcc dot gnu dot org
@ 2005-07-28 21:26 ` rth at gcc dot gnu dot org
2005-09-29 4:14 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-07-28 21:26 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-07-28 21:26 ` rth at gcc dot gnu dot org
@ 2005-09-29 4:14 ` pinskia at gcc dot gnu dot org
2005-09-30 10:38 ` hubicka at ucw dot cz
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-29 4:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-29 04:12 -------
Making this depend on the "need a new ra" bug.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |18427
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-09-29 4:14 ` pinskia at gcc dot gnu dot org
@ 2005-09-30 10:38 ` hubicka at ucw dot cz
2005-09-30 12:56 ` pinskia at gcc dot gnu dot org
2005-09-30 13:39 ` hubicka at ucw dot cz
6 siblings, 0 replies; 9+ messages in thread
From: hubicka at ucw dot cz @ 2005-09-30 10:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hubicka at ucw dot cz 2005-09-30 10:38 -------
Subject: Re: x86 machine builtins do not have any const/pure attributes set
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-29 04:12 -------
> Making this depend on the "need a new ra" bug.
Does the code quality regression still hold even after libcalls was
removed? These definitly was one of reason for ineffencities in
pure/const function call code generation.
Honza
>
> --
> What |Removed |Added
> ----------------------------------------------------------------------------
> BugsThisDependsOn| |18427
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
>
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-09-30 10:38 ` hubicka at ucw dot cz
@ 2005-09-30 12:56 ` pinskia at gcc dot gnu dot org
2005-09-30 13:39 ` hubicka at ucw dot cz
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-30 12:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-30 12:56 -------
(In reply to comment #5)
> Does the code quality regression still hold even after libcalls was
> removed? These definitly was one of reason for ineffencities in
> pure/const function call code generation.
I doubt it since these expanded into RTL instruction and there is no call at the rtl level.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-09-30 12:56 ` pinskia at gcc dot gnu dot org
@ 2005-09-30 13:39 ` hubicka at ucw dot cz
6 siblings, 0 replies; 9+ messages in thread
From: hubicka at ucw dot cz @ 2005-09-30 13:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hubicka at ucw dot cz 2005-09-30 13:38 -------
Subject: Re: x86 machine builtins do not have any const/pure attributes set
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-30 12:56 -------
> (In reply to comment #5)
> > Does the code quality regression still hold even after libcalls was
> > removed? These definitly was one of reason for ineffencities in
> > pure/const function call code generation.
>
> I doubt it since these expanded into RTL instruction and there is no call at the rtl level.
Hmm, right ;) Should look deper into PR before responding...
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/21588] x86 machine builtins do not have any const/pure attributes set
[not found] <bug-21588-280@http.gcc.gnu.org/bugzilla/>
@ 2008-04-21 8:08 ` ubizjak at gmail dot com
0 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2008-04-21 8:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from ubizjak at gmail dot com 2008-04-21 08:07 -------
Fixed for 4.3.0 by:
Author: uros
Date: Sat Jul 14 13:46:40 2007
New Revision: 126639
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126639
Log:
* config/i386/i386.c (init_mmx_sse_builtins): Define all builtins
except __builtin_ia32_emms, __builtin_ia32_ldmxcsr,
__builtin_ia32_stmxcsr, __builtin_ia32_maskmovq,
__builtin_ia32_loadups,
__builtin_ia32_storeups, __builtin_ia32_loadhps,
__builtin_ia32_loadlps,
__builtin_ia32_storehps, __builtin_ia32_storelps,
__builtin_ia32_movntps, __builtin_ia32_movntq, __builtin_ia32_sfence,
__builtin_ia32_femms, __builtin_ia32_maskmovdqu,
__builtin_ia32_loadupd,
__builtin_ia32_storeupd, __builtin_ia32_loadhpd,
__builtin_ia32_loadlpd,
__builtin_ia32_movnti, __builtin_ia32_movntpd, __builtin_ia32_movntdq,
__builtin_ia32_clflush, __builtin_ia32_lfence, __builtin_ia32_mfence,
__builtin_ia32_loaddqu, __builtin_ia32_storedqu,
__builtin_ia32_monitor,
__builtin_ia32_mwait, __builtin_ia32_lddqu, __builtin_ia32_movntdqa,
__builtin_ia32_movntsd and __builtin_ia32_movntss as const builtins
using def_builtin_const.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-04-21 8:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-15 17:50 [Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set steven at gcc dot gnu dot org
2005-05-15 18:05 ` [Bug target/21588] " pinskia at gcc dot gnu dot org
2005-05-16 18:14 ` rth at gcc dot gnu dot org
2005-07-28 21:26 ` rth at gcc dot gnu dot org
2005-09-29 4:14 ` pinskia at gcc dot gnu dot org
2005-09-30 10:38 ` hubicka at ucw dot cz
2005-09-30 12:56 ` pinskia at gcc dot gnu dot org
2005-09-30 13:39 ` hubicka at ucw dot cz
[not found] <bug-21588-280@http.gcc.gnu.org/bugzilla/>
2008-04-21 8:08 ` ubizjak at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).