<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:nok.raven@gmail.com" title="Nikita Kniazev <nok.raven@gmail.com>"> <span class="fn">Nikita Kniazev</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - switch is not converted into an argument LUT when a call return value is discarded"
   href="https://bugs.llvm.org/show_bug.cgi?id=41259">bug 41259</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>REOPENED
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - switch is not converted into an argument LUT when a call return value is discarded"
   href="https://bugs.llvm.org/show_bug.cgi?id=41259#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - switch is not converted into an argument LUT when a call return value is discarded"
   href="https://bugs.llvm.org/show_bug.cgi?id=41259">bug 41259</a>
              from <span class="vcard"><a class="email" href="mailto:nok.raven@gmail.com" title="Nikita Kniazev <nok.raven@gmail.com>"> <span class="fn">Nikita Kniazev</span></a>
</span></b>
        <pre><span class="quote">> Probably I am missing something. There is a branch to a non-existing default case, until I explicitly place a `__builtin_unreachable()` in it. This does not happen for the switch with uses. <a href="https://godbolt.org/z/hH8geH">https://godbolt.org/z/hH8geH</a></span >

Ah, this is invalid. In case when function has the return type and does not
have return statement it is considered unreachable because of UB, and when the
return type is void it cannot assume that it is unreachable.

I am closing this since the fix was recommited in
<a href="https://reviews.llvm.org/rL358483">https://reviews.llvm.org/rL358483</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>