This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]