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

    <tr>
        <th>Summary</th>
        <td>
            llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.cpp:406: pointless test ?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </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/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.cpp:406:16: style: Expression is always true because 'else if' condition is opposite to previous condition at line 402. [multiCondition]

Source code is

    else if (Op.isExpr()) {
      if (const auto *C = dyn_cast<MCConstantExpr>(Op.getExpr()))
        Imm = C->getValue();

    } else if (!Op.isExpr()) // Exprs will be replaced with a fixup value.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk0-PmzwQxj_NcBktMmMI4cAh_3j1HlattG2vlTGziVsHI8ZsNt--gk27adVjJWQhz8Pj3wyPjYg79sw1FFso9omZ4imMdWdbneVJG7pr_RRNdBZNb_xVeEQ7DPbE9juKuQroDag9qNvq_csZqPGuBWo-mfHIEajZPO7_-_gZqHncve3tWeyv_cfdLnR8OLsYeUztMIDe5GoFepPNC0q8ep5fDq_DyCIu9OgEjb-Yq2AcJ8aWrZmEEahkL4zuGahEG_rOxZs8DEMQFxljwGHkFxcmuVOYiN71jLmiFKHYnicf3e5nGYr9fZdPYRotow0do5P7CiLijQCB1h-G1MmMDbQGqoAqhHL7LsWbzoZeIpopBgTa7BD0Hrtr_9UaiaB384R6iaaPi5c-vFkfOf7mPT931oj_n8-L1e4B9OHI8YvxE9_kevsnN5T7e3ag7G_41AA1y68QvDjvsWUcefDGcocXF09o8Nm9TgO-zKelb_5JV-uu0pVJuM5Ktcq1oqxMTnWhVKFa6grShVbPXOVU6NyuuGNSHa8SV5OiXGW0VmvSukw1ZetMF2tVUpVl1RpyxWfjfDpnLw3jMXEiE9dlVeoy8aZlL0u6iXq-4FIEojnsYz1_89BOR4FceSdR3l2ii57rfxtoHILro2cRjCwRQTfJNPr6FOOwXKVlukcXT1Ob2rCcfAOYQYcxfGM7AyxdCFCzdPkjAAD__xf0Jcw">