<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:warren_ristow@playstation.sony.com" title="Warren Ristow <warren_ristow@playstation.sony.com>"> <span class="fn">Warren Ristow</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Wrong code generation at -O2 leading to division by zero"
   href="https://bugs.llvm.org/show_bug.cgi?id=30806">bug 30806</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>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

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

         <tr>
           <td style="text-align:right;">Fixed By Commit(s)</td>
           <td>r347934
           </td>
           <td>
                
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Wrong code generation at -O2 leading to division by zero"
   href="https://bugs.llvm.org/show_bug.cgi?id=30806#c17">Comment # 17</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Wrong code generation at -O2 leading to division by zero"
   href="https://bugs.llvm.org/show_bug.cgi?id=30806">bug 30806</a>
              from <span class="vcard"><a class="email" href="mailto:warren_ristow@playstation.sony.com" title="Warren Ristow <warren_ristow@playstation.sony.com>"> <span class="fn">Warren Ristow</span></a>
</span></b>
        <pre>(In reply to Warren Ristow from <a href="show_bug.cgi?id=30806#c16">comment #16</a>)
<span class="quote">> 
> The patch has landed:
> <a href="https://reviews.llvm.org/rL347934">https://reviews.llvm.org/rL347934</a></span >

I'm re-opening, as this patch was reverted at:
<a href="https://reviews.llvm.org/rL348426">https://reviews.llvm.org/rL348426</a>

The problem is SEGVs in PHINode simplification in instcombine, as described in
the llvm-commits thread for r347934.

---------------------------------------------------------

As an aside, as discussed in the review:
<a href="https://reviews.llvm.org/D55232">https://reviews.llvm.org/D55232</a>

(for a related patch, to fix <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Vectorization causes unsafe integer div-by-zero"
   href="show_bug.cgi?id=38697">bug 38697</a>), in studying the history of the code in
this area, I noticed that a similar fix was made about a year ago at r289412.
But that year-old fix was reverted at r289453, with the following note:

  Reverts r289412. It caused an OOB PHI operand access in instcombine when
  ASan is enabled. Reduction in progress.

It may be that the SEGVs in PHINode simplification that motivated the revert
for the new patch are rooted in the same problem that motivated the revert that
was done a year ago.</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>