From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16143 invoked by alias); 28 Jul 2004 17:00:58 -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 16040 invoked by uid 9082); 28 Jul 2004 17:00:56 -0000 Date: Wed, 28 Jul 2004 17:01:00 -0000 From: "gcc-bugzilla at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040728170038.16800.steinmtz@us.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug other/16800] New: PowerPC - Unnecessary rldicl X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg03361.txt.bz2 List-Id: Description: A non-optimal code sequence is illustrated. The rldicl noted below is not needed (and doesn't occur for the "==" comparison). Duplicate using gcc 3.5 and command line: gcc -O3 -m64 -c test.c Testcase: long l1,l2; float f1,f2,f3,f4; void logic_func4() { l1 = (f1 == f2); l2 = (f3 > f4); } Assembly: .logic_func4: ld 8,.LC5@toc(2) ld 6,.LC4@toc(2) lfs 13,0(8) lfs 11,0(6) ld 5,.LC1@toc(2) ld 4,.LC2@toc(2) lfs 12,0(5) fcmpu 7,11,13 lfs 0,0(4) ld 11,.LC0@toc(2) ld 10,.LC3@toc(2) fcmpu 6,12,0 mfcr 3 rlwinm 3,3,30,1 rldicl 0,3,0,32 <-- Unnecessary. mfcr 9 rlwinm 9,9,27,1 std 0,0(10) std 9,0(11) blr -- Summary: PowerPC - Unnecessary rldicl 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=16800