<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Potential improvement for vectorization of sub"
   href="https://bugs.llvm.org/show_bug.cgi?id=35295">bug 35295</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Potential improvement for vectorization of sub"
   href="https://bugs.llvm.org/show_bug.cgi?id=35295#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Potential improvement for vectorization of sub"
   href="https://bugs.llvm.org/show_bug.cgi?id=35295">bug 35295</a>
              from <span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span></b>
        <pre>(In reply to Serguei Katkov from <a href="show_bug.cgi?id=35295#c3">comment #3</a>)
<span class="quote">> Also the code for mul generated by icc is better than code generated by
> clang as well... I guess the reason should be close to this sub but I'm not
> sure.</span >

Yes - this is very similar to <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Potential improvement for Loop Vectorization: XMM vs YMM vs ZMM"
   href="show_bug.cgi?id=35299">bug 35299</a>.

This should be fixed in IR with:
<a href="https://reviews.llvm.org/rL318404">https://reviews.llvm.org/rL318404</a>

We might still want to add ISD::SUB to x86's list of narrowable binops in
combineTruncatedArithmetic(), but I think we should open another bug if that's
needed.

Also, someone looking at non-x86 optimizations might want to open a bug for the
problem mentioned in <a href="show_bug.cgi?id=35295#c5">comment 5</a>.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>