[lno] [RFC] if-conversion and auto vectorizer

Richard Henderson rth@redhat.com
Tue Mar 16 23:37:00 GMT 2004


On Tue, Mar 16, 2004 at 11:55:59PM +0100, Toon Moene wrote:
> No valid (Fortran) program can cause the generation of floating point 
> exceptions or memory access violations ?

I think you're missing the point.  Valid Fortran programs perform
checks to see if particular operations may or should be evaluated.  E.g.

	if (y .eq. 0.) then
	  z = 0
	else
	  z = x / y
	endif

What Devang is proposing is to MOVE the test, creating (more or less)

	t1 = 0
	t2 = x / y
	if (y .eq. 0) then
	  z = t1
	else
	  z = t2
	endif

which turns a valid Fortran program into an invalid Fortran program.
Thus the concern that the transformation be suppressed when we cannot
prove that it will be safe.



r~



More information about the Gcc mailing list