<div dir="ltr"><div>Thank You.</div><div><br></div><div>But I cannot find your mentioned function LoopVectorizationCostModel::<wbr>computeFeasibleMaxVF(bool
      OptForSize, unsigned
      ConstTripCount). I am using LLVM 4. I have been trying to get the required code portion in LoopVectorize.cpp file. But I am unable to debug this. each time i debug it, it returns me vectorized IR in gdb.</div><div><br></div><div>My goal is simple when i mention my target name in opt it should vectorize by keeping the vector width= highest supported by my target which is 2048.</div><div>So $ opt -O3 -mytarget 1.ll -o 1_opt.ll</div><div><br></div><div>1_opt.ll should emit <2048xi32>, <1024xi32>.........................<32xi32> etc.</div><div><br></div><div>How to achieve this? Please help.</div><div><br></div><div>Thank You</div><div>Regards<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 13, 2018 at 12:40 AM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <br>
    <div class="m_-3865587264766527058moz-cite-prefix">On 07/12/2018 02:32 PM, hameeza ahmed
      via llvm-dev wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>If we pass march=knl, the llvm vectorizer (O3) generates
          max 16xi32 vector width instruction and 8xi32 or 4xi32 in
          recursive manner.</div>
        <div><br>
        </div>
        <div>I am working on a target with larger vector widths like
          32,64...</div>
        <div>Now how to enable the vectorizer (O3) to automatically
          generate larger vector size instructions recursively by
          specifying the new target. Which files have the code for this?</div>
      </div>
    </blockquote>
    <br></span>
    I believe that the thing that you're trying to affect is this:<br>
    <br>
    <blockquote type="cite">LoopVectorizationCostModel::<wbr>computeFeasibleMaxVF(bool
      OptForSize,<br>
                                    <wbr>                   unsigned
      ConstTripCount) {<br>
      ...<br>
        unsigned WidestRegister = TTI.getRegisterBitWidth(true);</blockquote>
    <br>
    and so your target's TargetTransformInfo class should return an
    appropriate value from getRegisterBitWidth.<br>
    <br>
     -Hal<br>
    <br>
    <blockquote type="cite"><span class="">
      <div dir="ltr">
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Please help</div>
        <div><br>
        </div>
        <div>Thank You</div>
        <div>Regards</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="m_-3865587264766527058mimeAttachmentHeader"></fieldset>
      <br>
      </span><pre>______________________________<wbr>_________________
LLVM Developers mailing list
<a class="m_-3865587264766527058moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_-3865587264766527058moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre class="m_-3865587264766527058moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </font></span></div>

</blockquote></div><br></div></div></div>