diff options
| author | David Goldblatt <davidtgoldblatt@gmail.com> | 2021-05-25 10:15:27 -0400 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2021-05-25 10:16:04 -0400 |
| commit | 8607a023574f29cbb0b3fdd26f36872ca6b4af5e (patch) | |
| tree | 8b6976c6938723fcd209e9014856e343dfe8f083 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | a92376d2971a44344e7623295e7c2a204109956f (diff) | |
[InstSimplify] Transform X * Y % Y --> 0
simplifyDiv already handles the case X * Y / Y --> X (barring overflow).
This adds the equivalent handling to simplifyRem.
Correctness:
https://alive2.llvm.org/ce/z/J2cUbS
https://alive2.llvm.org/ce/z/us9NUM
https://alive2.llvm.org/ce/z/AvaDGJ
https://alive2.llvm.org/ce/z/kq9ige
Extending the situations in which we apply this transform would not be
correct:
https://alive2.llvm.org/ce/z/Lf9V63
https://alive2.llvm.org/ce/z/6RPQK3
https://alive2.llvm.org/ce/z/p9UdxC
https://alive2.llvm.org/ce/z/A2zlhE
https://alive2.llvm.org/ce/z/vHTtLw
https://alive2.llvm.org/ce/z/lvpH42
Differential Revision: https://reviews.llvm.org/D102864
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
