<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/109950>109950</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm-cov][MC/DC][Qualfifcation] Boolean Terms with != are not analyzed correctly for MCDC coverage
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
escherle-validas
</td>
</tr>
</table>
<pre>
# Boolean Terms with != are not analyzed correctly for MCDC coverage
## Criticality: HIGH
During qualification of MCDC coverage at Validas we found that
In the following example the term “(v0!=v1) && v2” is not analyzed correctly.
the note equals operator "!=" takes two boolean inputs and produces a boolean output.
Therefore it has to be instrumented as well such that the impact from v0 to the result can be analyzed.
This results in a wrongly calculated MCDC coverage measured by LLVMCov.
Note: In plain C there is no native boolean type defined, therefore instrumentation is restricted to && and ||,
but for C++ and Rust the boolean type exists and therefore operators on it should be considered for MCDC coverage.
The problem occurs within Rust and C++
Rust:
![NEQ_one_atom_rust](https://github.com/user-attachments/assets/d14a0a2b-cb13-414c-9b59-1b7a45b97e6d)
Source Code and generated reports:
[Test_000008.zip](https://github.com/user-attachments/files/17129108/Test_000008.zip)
C++:
![NEQ_one_atom_cpp](https://github.com/user-attachments/assets/2272dec2-3378-4844-ab3e-43fa46827d8f)
Source Code and generated reports:
[Test_000008.zip](https://github.com/user-attachments/files/17129119/Test_000008.zip)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVV3PmzYU_jXOzRERHOAFLnLRkGat1FbqVvX2lTGH4M3YzB9J018_GZJ076Z1UrWLRREk9uE5z4eNuXPypIl2rNyz8rDhwY_G7siJkayi5MyV7LnbdKa_7hjmsDdGEdfwiezk4CL9CAwzlh-AWwJtPHDN1fUr9SCMtSS8usJgLLxvDy0IcybLT8TSA0tfMcwjZGull4Ir6a8sfwVv3v70Zp0_BCv1CX4PXMlBCu6l0WC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