]> git.ipfire.org Git - thirdparty/gcc.git/commit
Value Range: Add range op for builtin isinf
authorHaochen Gui <guihaoc@gcc.gnu.org>
Thu, 15 Aug 2024 03:19:10 +0000 (11:19 +0800)
committerHaochen Gui <guihaoc@gcc.gnu.org>
Thu, 15 Aug 2024 03:19:10 +0000 (11:19 +0800)
commitcd0930768ff936b681135bf8873e7f7b796a4ed9
treee51d104949e25c74000e0ba8b31430b4ce73f440
parent4d2e8fcdaf325357591326812fd032ce6dea44e5
Value Range: Add range op for builtin isinf

The builtin isinf is not folded at front end if the corresponding optab
exists.  So the range op for isinf is needed for value range analysis.
This patch adds range op for builtin isinf.

gcc/
PR target/114678
* gimple-range-op.cc (class cfn_isinf): New.
(op_cfn_isinf): New variables.
(gimple_range_op_handler::maybe_builtin_call): Handle
CASE_FLT_FN (BUILT_IN_ISINF).

gcc/testsuite/
PR target/114678
* gcc.dg/tree-ssa/range-isinf.c: New test.
* gcc.dg/tree-ssa/range-sincos.c: Remove xfail for s390.
* gcc.dg/tree-ssa/vrp-float-abs-1.c: Likewise.
gcc/gimple-range-op.cc
gcc/testsuite/gcc.dg/tree-ssa/range-isinf.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/range-sincos.c
gcc/testsuite/gcc.dg/tree-ssa/vrp-float-abs-1.c