<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic The optimization report in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962894#M95107</link>
    <description>&lt;P&gt;The optimization report generated by option "-opt-report" or "-opt-report-file" can tell what happened to loop at line 35:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;lt;vectorize.f90;35:36;hlo_opt_pred;MAIN__;0&amp;gt;&lt;BR /&gt;
	Condition at line 36 hoisted from loop at line 35&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;......&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;lt;vectorize.f90;35:35;hlo_unroll;MAIN__;0&amp;gt;&lt;BR /&gt;
	Loop at line 35 peeled iterations: 1 &amp;nbsp; &amp;nbsp;(pre-vector)&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Here the if statement at line 36 was brought outside the loop and then the loop iteration was reduced to only 1 so there is no longer vectorization report for it.&lt;/P&gt;

&lt;P&gt;For the debug output I had a try using the test case and found different output:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;(gdb) x/2i $rip&lt;BR /&gt;
	=&amp;gt; 0x402cf3 &amp;lt;p+307&amp;gt;: &amp;nbsp; &amp;nbsp;movl &amp;nbsp; $0x6,0x29ca07(%rip) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 0x69f704 &amp;lt;a_mp_x_+4&amp;gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x402cfd &amp;lt;p+317&amp;gt;: &amp;nbsp; &amp;nbsp;movl &amp;nbsp; $0x7,0x29c9f9(%rip) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 0x69f700 &amp;lt;a_mp_x_&amp;gt;&lt;BR /&gt;
	(gdb) p &amp;amp;x&lt;BR /&gt;
	$1 = (PTR TO -&amp;gt; ( INTEGER(4) (16,5))) 0x69f700&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Are you using the same options as in the attached makefile?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Xiaoping&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Mar 2014 05:54:59 GMT</pubDate>
    <dc:creator>Xiaoping_D_Intel</dc:creator>
    <dc:date>2014-03-28T05:54:59Z</dc:date>
    <item>
      <title>Possible Vectorization Issue in 14.0.1</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962892#M95105</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I'm having an issue with a port from ifort 11.1 32-bit to 14.0.1 64-bit on a Linux platform. &amp;nbsp;In the test case I've attached, the 11.1 compiler with -vec-report3 reports for line 35:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;remark: loop was not vectorized: existence of vector dependence.&lt;/P&gt;

&lt;P&gt;In the 14.0.1 compiler, no yea or nay is given about the vectorization of the loop starting on line 35. &amp;nbsp;This poses no problem in the attached test case as the output is exactly as expected. &amp;nbsp;I though that perhaps the lack of vector reporting may have something to do with the issue I'm seeing in the code from which the attached test case was derived. &amp;nbsp;In that code, the analogue of array "x" is set to 6 and 7 in the "condition == .false." branch of the code as well, however in a debugger, the 6 is placed outside the bounds of the array:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;
   (gdb)  x/2i $rip 
   =&amp;gt; ....: movl  $0x6,0x15f04b84(%rdi)
      ....: movl  $0x7,0x15f04b88(%rdi,%rax,4)
   (gdb) p $rdi
   = 64
   (gdb) p $rax
   = 0
   (gdb) p &amp;amp;x
   = (PTR TO -&amp;gt; (INTEGER(4) (0:15,0:15))) 0x15f04bc8&lt;/PRE&gt;

&lt;P&gt;The movl destination for 0x6 comes out to 0x15f04bc4 which is smaller than the start of the array. &amp;nbsp;This issue does not occur if optimization is disabled.&lt;/P&gt;

&lt;P&gt;Can anyone shed any light on what's happening here?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Phil Bailey&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 17:54:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962892#M95105</guid>
      <dc:creator>Phil_B_</dc:creator>
      <dc:date>2014-03-27T17:54:04Z</dc:date>
    </item>
    <item>
      <title>Absence of a report about</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962893#M95106</link>
      <description>&lt;P&gt;Absence of a report about vectorization is a typical symptom of dead code elimination. &amp;nbsp;In the long distant past, when compiler vendors tried to provide reports on dead code elimination, customers said they didn't want those reports.&lt;/P&gt;

&lt;P&gt;I suppose it's hard to follow across eliminated dead code in a debugger.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 21:37:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962893#M95106</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-03-27T21:37:11Z</dc:date>
    </item>
    <item>
      <title>The optimization report</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962894#M95107</link>
      <description>&lt;P&gt;The optimization report generated by option "-opt-report" or "-opt-report-file" can tell what happened to loop at line 35:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;lt;vectorize.f90;35:36;hlo_opt_pred;MAIN__;0&amp;gt;&lt;BR /&gt;
	Condition at line 36 hoisted from loop at line 35&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;......&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;lt;vectorize.f90;35:35;hlo_unroll;MAIN__;0&amp;gt;&lt;BR /&gt;
	Loop at line 35 peeled iterations: 1 &amp;nbsp; &amp;nbsp;(pre-vector)&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Here the if statement at line 36 was brought outside the loop and then the loop iteration was reduced to only 1 so there is no longer vectorization report for it.&lt;/P&gt;

&lt;P&gt;For the debug output I had a try using the test case and found different output:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;(gdb) x/2i $rip&lt;BR /&gt;
	=&amp;gt; 0x402cf3 &amp;lt;p+307&amp;gt;: &amp;nbsp; &amp;nbsp;movl &amp;nbsp; $0x6,0x29ca07(%rip) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 0x69f704 &amp;lt;a_mp_x_+4&amp;gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x402cfd &amp;lt;p+317&amp;gt;: &amp;nbsp; &amp;nbsp;movl &amp;nbsp; $0x7,0x29c9f9(%rip) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 0x69f700 &amp;lt;a_mp_x_&amp;gt;&lt;BR /&gt;
	(gdb) p &amp;amp;x&lt;BR /&gt;
	$1 = (PTR TO -&amp;gt; ( INTEGER(4) (16,5))) 0x69f700&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Are you using the same options as in the attached makefile?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Xiaoping&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2014 05:54:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962894#M95107</guid>
      <dc:creator>Xiaoping_D_Intel</dc:creator>
      <dc:date>2014-03-28T05:54:59Z</dc:date>
    </item>
    <item>
      <title>Thank you both for your help.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962895#M95108</link>
      <description>Thank you both for your help.  Based on what you said I was able to eliminate some possible causes of the issue and was able to get create a test case that demonstrates the exact issue.  I've attached vector2.tar.gz.  When you unzip it and run make, it will create two executables, "good" and "bad" that have -O0 and -O2 respectively.  You should be able to reproduce my gdb output from the original post using the "bad" executable.  

Thanks again for any help you can provide!

-Phil</description>
      <pubDate>Fri, 28 Mar 2014 17:56:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962895#M95108</guid>
      <dc:creator>Phil_B_</dc:creator>
      <dc:date>2014-03-28T17:56:47Z</dc:date>
    </item>
    <item>
      <title>Are you asking now about the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962896#M95109</link>
      <description>Are you asking now about the problem exhibited by the incomplete format at O2?  Want better format checking?</description>
      <pubDate>Sat, 29 Mar 2014 22:01:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962896#M95109</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-03-29T22:01:27Z</dc:date>
    </item>
    <item>
      <title>I have reproduced the error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962897#M95110</link>
      <description>&lt;P&gt;I have reproduced the error and opened a bug report for it:&amp;nbsp;DPD200254997&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Xiaoping&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 04:13:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Vectorization-Issue-in-14-0-1/m-p/962897#M95110</guid>
      <dc:creator>Xiaoping_D_Intel</dc:creator>
      <dc:date>2014-03-31T04:13:48Z</dc:date>
    </item>
  </channel>
</rss>

