diff options
| author | Krzysztof Drewniak <Krzysztof.Drewniak@amd.com> | 2024-05-20 10:44:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-20 10:44:18 -0500 |
| commit | 8b22bb8a62a259e35ccc49fb2f50077a2772cf2f (patch) | |
| tree | 744d86a8d8f06652c771d8ab03f16ee354e6f1a8 /lldb/test/API/python_api/debugger/TestDebuggerAPI.py | |
| parent | 02f1a992035f40b49435f0e7f358badd152d9dc2 (diff) | |
[DivRemPairs] Do not freeze poisons that can't be undef (#92627)
Per comments in DivRemPairs, the rewrite from
```llvm
%div = div %X, %Y
%rem = rem %X, %Y
```
to
```llvm
%div = div %X, %Y
%.mul = mul %div, %Y
%rem = sub %X, %mul
```
is unsound when %X or %Y are undef.
However, it is known to be sound if %X or %Y are poison but can't be
undef, since both the pre- and post-rewrite %rem are `poison`.
Additionally, proofs: https://alive2.llvm.org/ce/z/xtNQ8j
A comment in the pass listed a TODO for changing a usage of
isGuaranteedNotToBeUndefOrPoison() in the pass to something that only
detects undef. Such a function has been implemented since the time that
TODO was written, but has not been used.
Therefore, this commit updates DivRemPairs to use
isGuaranteedNotToBeUndef() instead.
Diffstat (limited to 'lldb/test/API/python_api/debugger/TestDebuggerAPI.py')
0 files changed, 0 insertions, 0 deletions
