Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Apparent vectorizer bug

$
0
0

The code block below appears to generate bad code when the automatic vectorizer is enabled but correct code when /Qvec- is used even up to /O3 optimization. The vectorizer does not track N properly so that the values of RD for N=5-8 are repeated for N=9-12 followed by the values expected for N=9 and up.

N = 0
R = RFI
 DO I = 1, M1B
  K = M2(I)
  DR = DROD*F(I)
  DO J = 1, K
    R = R + DR
    N = N + 1
    RD(N) = R
    R = R + DR
  END DO
END DO

Adding a PRINT statement in the inner loop (which probably disables vectorization) also eliminates the incorrect behavior.

This occurs running Intel(R) Composer XE 2013 Update 5 (package 198). I am downloading SP1 and will try that.

If this is a confirmed bug it would be great to have it reported formally.

Thanks,
Stuart


Viewing all articles
Browse latest Browse all 5691

Latest Images

Trending Articles



Latest Images