aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2021-09-16 21:25:20 +0000
committerKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2021-09-17 19:06:00 +0000
commit121aab84d16f659cea539becff2cc2fef82ec152 (patch)
tree53732c6916855179e1b8efbd58dc7ecf31ccdb32 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent08f0cb77197dc2842baa00f22f0264fa49d1475a (diff)
downloadllvm-121aab84d16f659cea539becff2cc2fef82ec152.zip
llvm-121aab84d16f659cea539becff2cc2fef82ec152.tar.gz
llvm-121aab84d16f659cea539becff2cc2fef82ec152.tar.bz2
[MLIR][Affine] Simplify nested modulo operations when able
It is the case that, for all positive a and b such that b divides a (e mod (a * b)) mod b = e mod b. For example, ((d0 mod 35) mod 5) can be simplified to (d0 mod 5), but ((d0 mod 35) mod 4) cannot be simplified further (x = 36 is a counterexample). This change enables more complex simplifications. For example, ((d0 * 72 + d1) mod 144) mod 9 can now simplify to (d0 * 72 + d1) mod 9 and thus to d1 mod 9. Expressions with chained modulus operators are reasonably common in tensor applications, and this change _should_ improve code generation for such expressions. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D109930
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions