From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2482 invoked by alias); 9 Jul 2004 18:05:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2431 invoked by uid 9082); 9 Jul 2004 18:05:31 -0000 Date: Fri, 09 Jul 2004 18:05:00 -0000 From: "gcc-bugzilla at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040709175338.16457.steinmtz@us.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug regression/16457] New: PowerPC - Combine two rldicr instructions into a single rlwinm. X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg00947.txt.bz2 List-Id: Description: A non-optimal code sequence is illustrated. Two rlidcr instructions could be replaced by a single rlwinm. Duplicate using gcc 3.5 and command line: gcc -O3 -m64 -c test.c Testcase: char *q; void foo (char *p) { unsigned int x; q = p - (x & ~1); } Assembly: rldicr 0,0,32,31 ld 9,.LC0@toc(2) rldicr 0,0,32,62 subf 3,0,3 std 3,0(9) blr The two rldicr instructions can be combined into one rlwinm with the resulting code looking like this: ld 9,.LC0@toc(2) rlwinm 0,0,0,0,30 subf 3,0,3 std 3,0(9) blr -- Summary: PowerPC - Combine two rldicr instructions into a single rlwinm. Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: enhancement Priority: P1 Component: regression 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=16457