<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:atrick@apple.com" title="Andrew Trick <atrick@apple.com>"> <span class="fn">Andrew Trick</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - wrong code at -Os and above"
   href="http://llvm.org/bugs/show_bug.cgi?id=18165">bug 18165</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;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - wrong code at -Os and above"
   href="http://llvm.org/bugs/show_bug.cgi?id=18165#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - wrong code at -Os and above"
   href="http://llvm.org/bugs/show_bug.cgi?id=18165">bug 18165</a>
              from <span class="vcard"><a class="email" href="mailto:atrick@apple.com" title="Andrew Trick <atrick@apple.com>"> <span class="fn">Andrew Trick</span></a>
</span></b>
        <pre><a href="mailto:mzolotukhin@apple.com">mzolotukhin@apple.com</a> says:

when LSR replaces uses of one IV with the other, it needs to adjust the
corresponding offsets. Adjusting here means multiplication by the strides ratio
(factor). In the test we had one IV of type i8, its offset was 128, and the
factor for this IV and the base IV was 2. LSR got the adjusted offset of
128*2=256 which later was truncated to i8, resulting in incorrect comparison
result.

Committed r202273
    M    lib/Transforms/Scalar/LoopStrengthReduce.cpp
    A    test/Transforms/LoopStrengthReduce/pr18165.ll</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>