public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/16797] New: PowerPC - Opportunity to remove unnecessary load instructions
@ 2004-07-28 17:00 gcc-bugzilla at gcc dot gnu dot org
  2004-07-28 17:36 ` [Bug target/16797] " bangerth at dealii dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-07-28 17:00 UTC (permalink / raw)
  To: gcc-bugs

Description:
A non-optimal code sequence is illustraded.  Values are being loaded from storage unecessarily.   Duplicate using gcc 3.5 and command line:

gcc -O3 -m64 -c test.c

Testcase:
long int i, j;
int foo ()
{

  j = (i>>52);

  if (j< 0) {
    i = 10;
  } else {
    i = 20;
  };

  return i;

}

Assembly:
.foo:
	ld 11,.LC0@toc(2)
	ld 9,.LC1@toc(2)
	ld 0,0(11)
	sradi 0,0,52
	cmpdi 7,0,0
	std 0,0(9)
	blt- 7,.L7
	li 0,20     <-- Load directly into register 3 here...
	std 0,0(11)
	lwa 3,4(11) <-- ... and eliminate this load.
	blr
.L7:
	li 0,10     <-- Load directly into register 3 here...
	std 0,0(11)
	lwa 3,4(11) <-- ... and eliminate this load.
	blr



-- 
           Summary: PowerPC - Opportunity to remove unnecessary load
                    instructions
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P1
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steinmtz at us dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org,steinmtz at us dot ibm
                    dot com
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16797


^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <bug-16797-8614@http.gcc.gnu.org/bugzilla/>]
[parent not found: <bug-16797-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-12-15 19:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-28 17:00 [Bug other/16797] New: PowerPC - Opportunity to remove unnecessary load instructions gcc-bugzilla at gcc dot gnu dot org
2004-07-28 17:36 ` [Bug target/16797] " bangerth at dealii dot org
2004-07-28 18:36 ` [Bug tree-optimization/16797] " pinskia at gcc dot gnu dot org
2004-07-30 18:11 ` steven at gcc dot gnu dot org
2004-11-03 14:40 ` nathan at gcc dot gnu dot org
2004-11-08 14:07 ` pinskia at gcc dot gnu dot org
2004-11-08 14:16 ` pinskia at gcc dot gnu dot org
2005-06-02 18:47 ` dnovillo at gcc dot gnu dot org
2005-09-10 17:59 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16797-8614@http.gcc.gnu.org/bugzilla/>
2005-11-02 17:16 ` pinskia at gcc dot gnu dot org
2006-08-26  4:37 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16797-4@http.gcc.gnu.org/bugzilla/>
2014-12-15 19:17 ` spop at gcc dot gnu.org

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