]> git.ipfire.org Git - thirdparty/gcc.git/commit
Implement ABS_EXPR operator for frange.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 10 Oct 2022 12:56:42 +0000 (14:56 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 11 Oct 2022 13:52:24 +0000 (15:52 +0200)
commit706d8583706475fb103d1123e507f604dccb8fd3
tree5b1b7bef4dba8ee7bf0a8b0b50afe73b6be9ad79
parentfe7371e7f93c247b5d0e257ca2a68064123cd018
Implement ABS_EXPR operator for frange.

Implementing ABS_EXPR allows us to fold certain __builtin_inf calls
since they are expanded into calls to involving ABS_EXPR.

This is an adaptation of the integer version.

gcc/ChangeLog:

* range-op-float.cc (class foperator_abs): New.
(floating_op_table::floating_op_table): Add ABS_EXPR entry.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/vrp-float-abs-1.c: New test.
gcc/range-op-float.cc
gcc/testsuite/gcc.dg/tree-ssa/vrp-float-abs-1.c [new file with mode: 0644]