]> git.ipfire.org Git - thirdparty/gcc.git/commit
Value Range: Add range op for builtin isnormal
authorHaochen Gui <guihaoc@gcc.gnu.org>
Thu, 15 Aug 2024 03:21:08 +0000 (11:21 +0800)
committerHaochen Gui <guihaoc@gcc.gnu.org>
Thu, 15 Aug 2024 03:27:11 +0000 (11:27 +0800)
commitd2e90c7d65749a02a20aca717ac47d02ef0b5d81
treec4b9e7cc1f4ee06badcda65b8c777bc4c3dee8a1
parentb1d21582bafa1954db3a62f0972ae3a2e3bc0b48
Value Range: Add range op for builtin isnormal

The former patch adds optab for builtin isnormal. Thus builtin isnormal
might not be folded at front end.  So the range op for isnormal is needed
for value range analysis.  This patch adds range op for builtin isnormal.

gcc/
* gimple-range-op.cc (class cfn_isfinite): New.
(op_cfn_finite): New variables.
(gimple_range_op_handler::maybe_builtin_call): Handle
CFN_BUILT_IN_ISFINITE.
* value-range.h (class frange): Declear known_isnormal and
known_isdenormal_or_zero.
(frange::known_isnormal): Define.
(frange::known_isdenormal_or_zero): Define.

gcc/testsuite/
* gcc.dg/tree-ssa/range-isnormal.c: New test.
gcc/gimple-range-op.cc
gcc/testsuite/gcc.dg/tree-ssa/range-isnormal.c [new file with mode: 0644]
gcc/value-range.h