<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/99799>99799</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:773:27: style: Redundant condition
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            code-quality,
            llvm:transforms
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dcb314
      </td>
    </tr>
</table>

<pre>
    Static analyser cppcheck says:

llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:773:27: style: Redundant condition: isUnreachable. '!A || (A && B)' is equivalent to '!A || B' [redundantCondition]

Source code is

   return !isUnreachable ||
           (isUnreachable && (BBToCheck.getFirstNonPHIOrDbg() != TI));

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8kt9unDwQxZ9muLGCYAzr9QUXsCv0RfrUVk3yAMZMFrdem9gm1b595c2fpnmAcoFGnrF-Z46PitGcHFEH7QDtsVBbWnzoZj3xuikmP1-6u6SS0Uw5ZS-RAtPrqhfSP1lUlwi8h-oI1evf2ucz4GjNBDjeB-Xiow_nCDjeaWVVyIU5r5b-9359cPGXSXop9boC74XgwHsUwHsW08VSLr7TvLlZucS0d7NJxrt8bOKDC6T0oiZLJQMUgHXPQBxAHBjgvmeAO8AdGwAloGAmMnrazLOy5BJL_vOdIQ9BO4Q34OGd1x4_rnjnt6CJaT8TM_FjhzEWKG3BMcD6L4WvkPextw9w_2nuRTTgfhju_SHbXJ4ojSbE9MW7b__dfg3H6QS4B5QZA_zI7m-vO0rgwwuhmDs-Sy5VQV0tsG4bzlEUS9fsxFxP9cyppRYbJZRS86OuatlMTbWThemwwqYSWFc73DeirFvekkTOiZRUew1NRWdlbJlfuvThVJgYN-qkFFIWVk1k4zVLiNmhm6dNWZMugAh4AMRrQHifPkQDc-5Clzs303aK0FTWxBT_IJJJlrp_ka1iC7ZbUlqvwcYRcDyZtGxTqf0V_qoha12D_0E6AY5XC7KQFxeeO_wdAAD__3qHBak">