The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > UNIX Standards and Benchmarks > UNIX & LINUX Benchmarks (Version 3.11) > Linux Benchmarks
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 12-09-2003
cpjain cpjain is offline
Registered User
 

Join Date: Dec 2003
Posts: 2
Arithmetic tests needs to be updated for advanced compiler optimization

Hi,
I was trying to build Linux Benchmarks with latest Intel C++ Compiler.
When I used -ipo (inter-procedural optimization) option, arithmetic test (arith.c) failed on execution.

The problem is Intel compiler's advanced optimization option (-ipo) optimizes much more than expected and this results in elimination of some part of code.
/-------------------------------------------------
++iter;
/* the loop calls a function to insure that something is done
the results of the function are fed back in (just so they
they won't be thrown away. A loop with
unused assignments may get optimized out of existence */
result = dumb_stuff(result);
/--------------------------------------------------------

This part gets eliminated becuase of IPO.

Steps to reproduce:
$icc -o ./pgms/arithoh -DTIME -O3 -xW -ipo -static -unroll -Darithoh ./src/arith.c

$./pgms/arithoh 1
0 loops

and this results in divide by zero error.

Regards,
CP
Reply With Quote
Forum Sponsor