<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<div class="moz-cite-prefix">On 03/16/2017 12:20 AM, Nema, Ashutosh
wrote:<br>
</div>
<blockquote
cite="mid:CY4PR12MB1799E9F551257D19C7F01A10FB260@CY4PR12MB1799.namprd12.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
tt
{mso-style-priority:99;
font-family:"Courier New";}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in"><br>
I think this seems about right. We shouldn't re-compare the
trip counts in the epilogue loop if the alias check is false
anyway:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><tt><span
style="font-size:10.0pt;background:white">int start = 0;</span></tt><b><span
style="font-family:"Courier New""><br>
</span></b><tt><span
style="font-size:10.0pt;background:white">if (n >=
vf) {</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New";background:white"><br>
<tt> if (check) {</tt><br>
<tt> for (...; start += vf)</tt><br>
<tt> ...</tt><br>
<tt> } else { goto scalar; }</tt><br>
<tt>} else { goto scalar; }</tt><br>
</span><br>
<tt><span style="font-size:10.0pt;background:white">if (n -
start >= vf2) {</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New";background:white"><br>
<tt> for (...; start += vf2)</tt><br>
<tt> ...</tt><br>
<tt>}</tt><br>
</span><br>
<tt><span style="font-size:10.0pt">scalar:</span></tt><br>
<tt><span style="font-size:10.0pt;background:white">for (i =
start; i < n; ++i) {</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New";background:white"><br>
<tt> …</tt><br>
<tt>}</tt></span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><br>
-Hal<br>
<br>
<br>
<o:p></o:p></p>
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D">This layout looks OK *<b>only when alias check is required*</b>, but what if alias check is not required in that case the layout probably will looks like this:</span></pre>
</div>
</blockquote>
<blockquote
cite="mid:CY4PR12MB1799E9F551257D19C7F01A10FB260@CY4PR12MB1799.namprd12.prod.outlook.com"
type="cite">
<div class="WordSection1">
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D"><o:p></o:p></span></pre>
<pre><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></pre>
<p class="MsoNormal" style="margin-left:.5in"><tt><span
style="font-size:10.0pt;background:white">int start = 0;</span></tt><b><span
style="font-family:"Courier New""><br>
</span></b><tt><span
style="font-size:10.0pt;background:white">if (n >= vf)
{</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New";background:white"><br>
<tt><s> if (check) {</s></tt><br>
<tt> for (...; start += vf)</tt><br>
<tt> ...</tt><br>
<tt><s> } else { goto scalar; }</s></tt><br>
<tt>} else { goto scalar; }</tt><br>
</span><br>
<tt><span style="font-size:10.0pt;background:white">if (n -
start >= vf2) {</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New";background:white"><br>
<tt> for (...; start += vf2)</tt><br>
<tt> ...</tt><br>
<tt>}</tt><br>
</span><br>
<tt><span style="font-size:10.0pt">scalar:</span></tt><br>
<tt><span style="font-size:10.0pt;background:white">for (i =
start; i < n; ++i) {</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New";background:white"><br>
<tt> …</tt><br>
<tt>}</tt></span><o:p></o:p></p>
<pre><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></pre>
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D">For ‘n < vf’ it should try executing epilog vector loop but in this layout it will execute scalar loop.</span></pre>
</div>
</blockquote>
<br>
Agreed.<br>
<br>
-Hal<br>
<br>
<blockquote
cite="mid:CY4PR12MB1799E9F551257D19C7F01A10FB260@CY4PR12MB1799.namprd12.prod.outlook.com"
type="cite">
<div class="WordSection1">
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D"><o:p></o:p></span></pre>
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D"><o:p> </o:p></span></pre>
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D">Regards,<o:p></o:p></span></pre>
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D">Ashutosh<o:p></o:p></span></pre>
<pre><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D"><o:p> </o:p></span></pre>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>