This is the mail archive of the gcc-bugs@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]

[Bug middle-end/31738] Fortran dot product vectorization is restricted



------- Comment #3 from dorit at il dot ibm dot com  2007-05-16 20:45 -------
(In reply to comment #2)
> Here is what happens in the three loops that don't get vectorized:
> (1) the loop in testvectdp2: 
...
> so the vectorizer is ok, except that in this case D.1437_32 doesn't seem to > be used anywhere in the function, so this stmt looks dead to me, but for 
> some reason it is not cleaned away before the vectorizer...  Still need to
> investigate why. 

So looks like the stmt 
   D.1437_32 = prephitmp.192_37
became dead by pass pr31738a.f90.089t.copyprop3.

So the question is what's the most appropriate fix:
(1) fix copyprop3 to also clean away any dead code it creates?
(2) add a dce pass after copyprop3?
(3) work around it in the vectorizer. I think it should be easy - just move the
check of the uses of the reduction in the loop until after the vectorizer
analysis pass that marks relevant stmts.

If (3) sounds like the way to go - I can prepare a patch for that.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31738


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