]> git.ipfire.org Git - people/ms/gcc.git/commit - gcc/gimple-range-op.cc
Implement range-op entry for __builtin_copysign.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 13 Oct 2022 15:51:29 +0000 (17:51 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 14 Oct 2022 16:43:02 +0000 (18:43 +0200)
commit8efc38347a7444dde3fb173f0f2c59a60b7db53d
treee86212f0412780f94d9206d52af30d02d481047e
parent3760dd553eed21ac5614cf0d0841ca984b4361e2
Implement range-op entry for __builtin_copysign.

copysign(MAGNITUDE, SIGN) is implemented as the absolute of MAGNITUDE,
with SIGN applied.  If the sign of "SIGN" cannot be determined, we
return a range of [-MAGNITUDE, +MAGNITUDE].

gcc/ChangeLog:

* gimple-range-op.cc (class cfn_copysign): New.
(gimple_range_op_handler::maybe_builtin_call): Add
CFN_BUILT_IN_COPYSIGN*.
gcc/gimple-range-op.cc