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
[parent not found: <bug-21588-280@http.gcc.gnu.org/bugzilla/>]

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).