|
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
|