From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26858 invoked by alias); 18 Aug 2002 11:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26837 invoked by uid 71); 18 Aug 2002 11:36:00 -0000 Resent-Date: 18 Aug 2002 11:36:00 -0000 Resent-Message-ID: <20020818113600.26836.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, dtucker@zip.com.au Received: (qmail 26013 invoked from network); 18 Aug 2002 11:29:34 -0000 Received: from unknown (HELO mta03bw.bigpond.com) (139.134.6.86) by sources.redhat.com with SMTP; 18 Aug 2002 11:29:34 -0000 Received: from dodgynet.dyndns.org ([144.135.24.84]) by mta03bw.bigpond.com (Netscape Messaging Server 4.15 mta03bw May 23 2002 23:53:28) with SMTP id H11EL700.FQG for ; Sun, 18 Aug 2002 21:29:31 +1000 Received: from CPE-144-137-124-194.nsw.bigpond.net.au ([144.137.124.194]) by bwmam06.mailsvc.email.bigpond.com(MailRouter V3.0n 47/34918601); 18 Aug 2002 21:29:31 Received: (from dtucker@localhost) by dodgynet.dyndns.org. (8.11.6/8.11.6) id g7IBTUO03308; Sun, 18 Aug 2002 21:29:30 +1000 Message-Id: <200208181129.g7IBTUO03308@dodgynet.dyndns.org.> Date: Sun, 18 Aug 2002 14:26:00 -0000 From: Darren Tucker Reply-To: dtucker@zip.com.au To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: optimization/7625: gcc pessimized 64-bit % operator on hppa2.0 X-SW-Source: 2002-08/txt/msg00363.txt.bz2 List-Id: >Number: 7625 >Category: optimization >Synopsis: gcc pessimized 64-bit % operator on hppa2.0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: pessimizes-code >Submitter-Id: net >Arrival-Date: Sun Aug 18 04:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Darren Tucker >Release: 3.2 >Organization: none >Environment: System: HP-UX c240 B.11.00 A 9000/782 2007058445 two-user license host: hppa2.0w-hp-hpux11.00 build: hppa2.0w-hp-hpux11.00 target: hppa2.0w-hp-hpux11.00 configured with: ../gcc-3.2/configure --with-as=/usr/local/hppa2.0w-hp-hpux11.00/bin/as --with-gnu-as --with-ld=/usr/ccs/bin/ld --enable-languages=c,c++ >Description: GCC seems to compile code for the 64-bit "%" operator that is about 6 times slower that the HP native compiler on HPPA2.0 machines, even with -march=2.0. This was noticed affecting OpenSSL DSA operations and identified by Deron Meranda . For background, please see http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=102646106016694&w=2 $ cat logmodtest.c #include int main() { unsigned long long i, a=0; for(i=2000000; i; --i) a += (i+10) % i; printf("Result=%llu\n", a); exit(0); } $ cc +O3 longmodtest.c $ time ./a.out Result=19999913 real 0m0.649s user 0m0.650s sys 0m0.000s $ gcc -O3 -march=2.0 longmodtest.c $ time ./a.out Result=19999913 real 0m3.712s user 0m3.700s sys 0m0.020s >How-To-Repeat: $ gcc -O3 -march=2.0 -v -save-temps longmodtest.c Reading specs from /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2/specs Configured with: ../gcc-3.2/configure --with-as=/usr/local/hppa2.0w-hp-hpux11.00/bin/as --with-gnu-as --with-ld=/usr/ccs/bin/ld --enable-languages=c,c++ Thread model: single gcc version 3.2 /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2/cpp0 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem=unix -Asystem=hpux -Acpu=hppa -Amachine=hppa -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -D_PA_RISC1_1 -D__hp9000s700 -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__ -D_INCLUDE_LONGLONG longmodtest.c longmodtest.i GNU CPP version 3.2 (cpplib) (hppa) ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/hppa2.0w-hp-hpux11.00/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2/include /usr/include End of search list. /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2/cc1 -fpreprocessed longmodtest.i -quiet -dumpbase longmodtest.c -march=2.0 -O3 -version -o longmodtest.s GNU CPP version 3.2 (cpplib) (hppa) GNU C version 3.2 (hppa2.0w-hp-hpux11.00) compiled by GNU C version 3.2. /usr/local/hppa2.0w-hp-hpux11.00/bin/as --traditional-format -o longmodtest.o longmodtest.s /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2/collect2 -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main /usr/ccs/lib/crt0.o -L/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/langtools/lib -L/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2/../../.. longmodtest.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh begin 644 longmodtest.i.bz2 M0EIH.3%!62936=43M8T`!)W?@'X46G__[P-D$$Z_[__Z8`J_>`Z:6VN[?>JC ME=ZUMPY`.SWW<"22:)C0B83:GJ::,33(TT```&@$IJ9`IE3\BGFJ,F MGJ8F0``-``]0!S3$R9-&$P3$TP"8!#!&!&`2:2131/0F1,$#1ZC:GJ!H&@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