diff options
author | luxufan <luxufan@iscas.ac.cn> | 2022-12-20 23:03:04 +0800 |
---|---|---|
committer | luxufan <luxufan@iscas.ac.cn> | 2023-01-03 22:51:12 +0800 |
commit | 5b25a0bcb14ba0b772a1d6b4ebbed5869a4a0fa7 (patch) | |
tree | a67441c965dd141d5e20807efb90d66f5263c79d /llvm/lib/CodeGen/CodeGen.cpp | |
parent | 419a21609444aa81e335254998f24099dc4a3c1f (diff) | |
download | llvm-5b25a0bcb14ba0b772a1d6b4ebbed5869a4a0fa7.zip llvm-5b25a0bcb14ba0b772a1d6b4ebbed5869a4a0fa7.tar.gz llvm-5b25a0bcb14ba0b772a1d6b4ebbed5869a4a0fa7.tar.bz2 |
[CVP] Simplify SRem when constantrange abs(lhs) < abs(rhs)
For `srem x, y`, if abs(constant range of x) less than abs(constant
range of y), we can simplify it as:
`srem x, y => x` if y is guaranteed to be positive.
'srem x, y => -x' if y is guaranteed to be negative.
Differential Revision: https://reviews.llvm.org/D140405
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions