[all-commits] [llvm/llvm-project] 5b25a0: [CVP] Simplify SRem when constantrange abs(lhs) < ...
luxufan via All-commits
all-commits at lists.llvm.org
Tue Jan 3 06:53:21 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5b25a0bcb14ba0b772a1d6b4ebbed5869a4a0fa7
https://github.com/llvm/llvm-project/commit/5b25a0bcb14ba0b772a1d6b4ebbed5869a4a0fa7
Author: luxufan <luxufan at iscas.ac.cn>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
M llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list