Closed hujiajie closed 11 years ago
The range information is invalidated as our loop analysis cannot handle unconstrained increments like the i++ in your example. We do not currently compute trip counts.
You found a bug in the code generation of ++ though. Although it was computed on doubles, the integer ++ was used in OpenCL. The wrong cast was just a symptom of that wrong behavior.
Thanks for reporting this. Stephan
Steps to reproduce:
Expected result:
Actual result:
Remarks: Here is the generated kernel string:
RTl_i
andRTl_j
are integers at first. Then, during the range analysis, the range information is invalidated here. I failed to understand this part though and don't know whether the result is right.i++
statement in thefor
loop is translated correctly. Why do they differ?Thanks!