<html>
    <head>
      <base href="http://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:brzycki@gmail.com" title="Brian Rzycki <brzycki@gmail.com>"> <span class="fn">Brian Rzycki</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - SimplifyCFG is not collapsing unneeded switches"
   href="http://bugs.llvm.org/show_bug.cgi?id=2563">bug 2563</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;">CC</td>
           <td>
                
           </td>
           <td>brzycki@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WORKSFORME
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - SimplifyCFG is not collapsing unneeded switches"
   href="http://bugs.llvm.org/show_bug.cgi?id=2563#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - SimplifyCFG is not collapsing unneeded switches"
   href="http://bugs.llvm.org/show_bug.cgi?id=2563">bug 2563</a>
              from <span class="vcard"><a class="email" href="mailto:brzycki@gmail.com" title="Brian Rzycki <brzycki@gmail.com>"> <span class="fn">Brian Rzycki</span></a>
</span></b>
        <pre>While inspecting ComputeValueKnownInPredecessors() in JumpThreading.cpp we came
across the following comment:

    /// TODO: Per PR2563, we could infer value range information about a
    /// predecessor based on its terminator.

We went to see if this is still an issue given the age of this ticket with a
recent tip build of LLVM.

The output at -O3 looks like the following:

cond.false3.i17.i:                                ; preds = %grad.exit48.i
  %27 = or i32 %and.i12.i, 2
  %28 = icmp eq i32 %27, 14
  %cond9.i16.i = select i1 %28, double %sub.i, double 0xBFCE147AE147B000
  br label %grad.exit28.i


This is almost identical to the code transform Eli suggested in <a href="show_bug.cgi?id=2563#c3">Comment 3</a>. I
think this ticket can be closed as done.</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>