[Bug fortran/20945] about 2x perfomance regression in comparision with 3.4.2
--- Additional Comments From denis dot nagorny at intel dot com 2005-06-22 14:34 --- Ok. It seems like this issue is mostly fixed now. I incresead NIT counter up to 200 and obtained following results: 3.4.2 ~ 3.4s old 4.0 ~ 6.4s mainline ~ 4.0s -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20945
[Bug fortran/20945] New: about 2x perfomance regression in comparision with 3.4.2
fortran 4.0 shows perfomance regression (with -O2 option) in comparison with g77 from 3.4.2 on IA32 with attached test. This test is obtained from cpu2000/mgrid test. It consists of calling of two functions: PSINV and RESID. Instrumental control (gprof) shows that most part of time spends in RESID function. There is one strange thing for me. If I remove call of PSINV function test (compiled by g77) became more slowly then it was before (with this call). gfortran from gcc4.0 behave more predictable. It looks like g77 from gcc 3.4.2 does interprocedure optimization for better cache using which can't do gfortran from gcc4.0 You can reproduce my results with attached test. Timing results: With PSINV call g77 sample.f -O2 -static 0m0.693s 0m0.685s 0m0.008s 0m0.694s 0m0.685s 0m0.009s 0m0.690s 0m0.683s 0m0.007s With PSINV call gfortran sample.f -O2 -static 0m1.293s 0m1.279s 0m0.015s 0m1.320s 0m1.306s 0m0.014s 0m1.303s 0m1.294s 0m0.008s Without PSINV call: g77 sample1.f -O2 -static -o z342s time ./z342s 0m0.902s 0m0.893s 0m0.007s 0m0.930s 0m0.923s 0m0.008s 0m0.894s 0m0.889s 0m0.005s Without PSINV call gfortran sample1.f -O2 -static -o z40s time ./z40s 0m0.758s 0m0.752s 0m0.006s 0m0.762s 0m0.758s 0m0.004s 0m0.759s 0m0.757s 0m0.004s cat /proc/cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Xeon(TM) CPU 2.40GHz stepping: 7 cpu MHz : 2400.858 cache size : 512 KB -- Summary: about 2x perfomance regression in comparision with 3.4.2 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: denis dot nagorny at intel dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i586-suse-linux GCC host triplet: i586-suse-linux GCC target triplet: i586-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20945
[Bug fortran/20945] about 2x perfomance regression in comparision with 3.4.2
--- Additional Comments From denis dot nagorny at intel dot com 2005-04-11 13:20 --- Created an attachment (id=8591) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8591action=view) Test for results reproducing -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20945
[Bug fortran/20026] New: Weird optimization affects cpu200/178.galgel testing
LAPACK tries to determine behavior of present double pre- precision numbers. One of used methods is based on property that (on IA32) 9.0071992547400992E+015 + 1 will be the same 9.0071992547400992E+015, but 9.0071992547400992E+015 + 2 will be differ. This sample demonstrates that any level of optimization in gfortran version 4.0.0 20050215 breaks this functionality. Due to this feature it's impossible now to use 178.galgel test from cpu2000 testsuite. Please compile following sample (I'll attach them also) with and without option -O1. You'll obtain Good without optimization and Bad with -O1. !!*** REAL*8 A, B, C REAL*8 foo A = 9.0071992547400992E+015 B = 1 C = foo( A, B ) IF( C.EQ.A ) THEN write(*,*) Good ELSE write(*,*) Bad!!! write(*,*) A=,A write(*,*) C=,C END IF END !!** FUNCTION foo( A, B ) REAL*8 foo REAL*8 A, B foo = A + B RETURN END !!* gfortran -v Using built-in specs. Target: i586-suse-linux Configured with: ../src/gcc/configure --enable-threads=posix --prefix=/users/x/work/gcc40/real --disable-checking --enable-libgcj --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc version 4.0.0 20050215 (experimental -- Summary: Weird optimization affects cpu200/178.galgel testing Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: critical Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: denis dot nagorny at intel dot com CC: gcc-bugs at gcc dot gnu dot org,grigory dot zagorodnev at intel dot com GCC build triplet: i586-suse-linux GCC host triplet: i586-suse-linux GCC target triplet: i586-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20026
[Bug fortran/20026] Weird optimization affects cpu200/178.galgel testing
--- Additional Comments From denis dot nagorny at intel dot com 2005-02-17 13:28 --- Created an attachment (id=8214) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8214action=view) sample for error reproducing -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20026