6 Commits

Author SHA1 Message Date
Yingwei Zheng
a3a253d3c7
[ConstantFPRange] Implement ConstantFPRange::makeExactFCmpRegion (#111490)
Note: The current implementation doesn't return optimal result for `fcmp
one/une x, +/-inf` since we don't handle this case in
https://github.com/llvm/llvm-project/pull/110891. Maybe we can make it
optimal after seeing some real-world cases.
2024-10-08 15:55:10 +08:00
Yingwei Zheng
4647a4666c
[ConstantFPRange] Implement ConstantFPRange::makeSatisfyingFCmpRegion (#110891)
This patch adds support for `ConstantFPRange::makeSatisfyingFCmpRegion`.
We only check the optimality for cases where the result can be
represented by a ConstantFPRange.

This patch also adds some tests for `ConstantFPRange::fcmp` because it
depends on `makeSatisfyingFCmpRegion`. Unfortunately we cannot
exhaustively test this function due to time limit. I just pick some
interesting ranges instead.
2024-10-08 13:41:24 +08:00
Yingwei Zheng
586736226e
[ConstantFPRange] Implement ConstantFPRange::makeAllowedFCmpRegion (#110082)
This patch adds `makeAllowedFCmpRegion` support for `ConstantFPRange`.
2024-10-02 20:44:15 +08:00
Yingwei Zheng
4db10561cc
[ConstantFPRange] Address review comments. NFC. (#110793)
1. Address post-commit review comments
https://github.com/llvm/llvm-project/pull/86483#discussion_r1782305961.
2. Move some NFC changes from
https://github.com/llvm/llvm-project/pull/110082 to this patch.
2024-10-02 14:22:15 +08:00
Yingwei Zheng
59693ea6d1
[ConstantFPRange] Remove ConstantFPRange::toKnownFPClass (#109960)
Addresses comment
https://github.com/llvm/llvm-project/pull/86483#pullrequestreview-2327710679.
2024-09-25 20:20:03 +08:00
Yingwei Zheng
fa824dc0dd
[LLVM][IR] Add constant range support for floating-point types (#86483)
This patch adds basic constant range support for floating-point types to enable range-based optimizations.
2024-09-25 13:58:23 +08:00