diff options
author | Noah Goldstein <goldstein.w.n@gmail.com> | 2024-06-27 22:34:37 +0800 |
---|---|---|
committer | Noah Goldstein <goldstein.w.n@gmail.com> | 2024-06-28 16:52:03 +0800 |
commit | afa3d58ee2224f1037116f4cab44a23bd232a416 (patch) | |
tree | 339558aec91182f57da0099b31892a18c0b733b0 /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp | |
parent | 11456944d481b5d1b139e346ea7992c0b692781a (diff) | |
download | llvm-afa3d58ee2224f1037116f4cab44a23bd232a416.zip llvm-afa3d58ee2224f1037116f4cab44a23bd232a416.tar.gz llvm-afa3d58ee2224f1037116f4cab44a23bd232a416.tar.bz2 |
[InstCombine] Fold `(mul (div exact X, C0), C1)` -> `(div exact X, C0/C1)`
We can do this if `C0 % C1 == 0` and if we avoid UB in the signed
case.
Proofs: https://alive2.llvm.org/ce/z/HHWHDg
Closes #96915
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions