<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SimplifyCFG.cpp fails to build lookup tables in many cases"
   href="https://bugs.llvm.org/show_bug.cgi?id=39046">39046</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SimplifyCFG.cpp fails to build lookup tables in many cases
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>slandden@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre><a href="https://godbolt.org/z/QuklOn">https://godbolt.org/z/QuklOn</a>

#include <stdio.h>
int switchexample(unsigned char num) {
   switch(num) {
   case 0:
        return 120;
   case 1:
        return 119;
   case 3:
        return 118;
   case 4:
        return 118;
   case 11:
        return 117;
   case 12:
        return 116;
   case 13:
        return 115;
   case 14:
        return 114;
   case 15:
        return 113;
   case 16:
        return 112;
   case 17:
        return 111;
   case 18:
        return 110;
   case 19:
        return 109;
   case 37: //change this to 36 and it will use a lookup table
        return 108;
   case 35:
        return 108;
   default:
        puts("hi");
        return 1;
   }
}

Noticed while working on 39013</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>