public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/16798] New: PowerPC - Opportunity to use recording form instruction.
@ 2004-07-28 17:01 gcc-bugzilla at gcc dot gnu dot org
  2004-07-28 17:36 ` [Bug target/16798] " bangerth at dealii dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-07-28 17:01 UTC (permalink / raw)
  To: gcc-bugs

Description:
A non-optimal code sequence is illustraded.  The recording form of an instruction could be used allowing for the elimination of a compare.  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 <-- Use the recording form of sradi
	cmpdi 7,0,0  <-- and eliminate this compare.
	std 0,0(9)
	blt- 7,.L7
	li 0,20
	std 0,0(11)
	lwa 3,4(11)
	blr
.L7:
	li 0,10
	std 0,0(11)
	lwa 3,4(11)
	blr



-- 
           Summary: PowerPC - Opportunity to use recording form instruction.
           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=16798


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

end of thread, other threads:[~2009-05-14  3:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-28 17:01 [Bug other/16798] New: PowerPC - Opportunity to use recording form instruction gcc-bugzilla at gcc dot gnu dot org
2004-07-28 17:36 ` [Bug target/16798] " bangerth at dealii dot org
2004-08-01  0:54 ` pinskia at gcc dot gnu dot org
2004-10-31  4:58 ` pinskia at gcc dot gnu dot org
2004-11-09 12:26 ` nathan at gcc dot gnu dot org
     [not found] <bug-16798-8614@http.gcc.gnu.org/bugzilla/>
2005-11-02 17:16 ` pinskia at gcc dot gnu dot org
2006-02-06 14:06 ` bonzini at gnu dot org
2006-04-08  2:20 ` pinskia at gcc dot gnu dot org
2009-05-14  3:04 ` bje at gcc dot gnu dot 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).