diff options
| author | Alex Zinenko <zinenko@google.com> | 2019-01-06 14:09:15 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 14:59:22 -0700 |
| commit | c47ed53211030afa52d10a497ba42ff29b3a1e7d (patch) | |
| tree | 2cf1b1b91d40f3566760f0e3d7f3880d0aa30fcb /mlir/lib/Analysis | |
| parent | caa7e7062795b78860f45925b64e2704e0a0a293 (diff) | |
| download | bcm5719-llvm-c47ed53211030afa52d10a497ba42ff29b3a1e7d.tar.gz bcm5719-llvm-c47ed53211030afa52d10a497ba42ff29b3a1e7d.zip | |
Add simple constant folding hook for CmpIOp
Integer comparisons can be constant folded if both of their arguments are known
constants, which we can compare in the compiler. This requires implementing
all comparison predicates, but thanks to consistency between LLVM and MLIR
comparison predicates, we have a one-to-one correspondence between predicates
and llvm::APInt comparison functions. Constant folding of comparsions with
maximum/minimum values of the integer type are left for future work.
This will be used to test the lowering of mod/floordiv/ceildiv in affine
expressions at compile time.
PiperOrigin-RevId: 228077580
Diffstat (limited to 'mlir/lib/Analysis')
0 files changed, 0 insertions, 0 deletions

