From: Jie Zhang Date: Tue, 20 Oct 2009 03:33:57 +0000 (+0000) Subject: simplify-rtx.c (simplify_const_unary_operation): Handle SS_ABS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91c29f68eff59da1492313465d69ee06fe0fc2f0;p=gcc.git simplify-rtx.c (simplify_const_unary_operation): Handle SS_ABS. * simplify-rtx.c (simplify_const_unary_operation): Handle SS_ABS. * doc/rtl.texi: Document ss_abs. From-SVN: r153003 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 548cc0b36ed..ee8666e84c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-10-20 Jie Zhang + + * simplify-rtx.c (simplify_const_unary_operation): Handle + SS_ABS. + * doc/rtl.texi: Document ss_abs. + 2009-10-19 Jakub Jelinek * c-common.c (c_parse_error): Handle CPP_UTF8STRING. diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index ba72b48096b..e28ba032cdd 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi @@ -2364,9 +2364,14 @@ Similar but represent left and right rotate. If @var{c} is a constant, use @code{rotate}. @findex abs +@findex ss_abs @cindex absolute value @item (abs:@var{m} @var{x}) +@item (ss_abs:@var{m} @var{x}) Represents the absolute value of @var{x}, computed in mode @var{m}. +@code{ss_abs} ensures that an out-of-bounds result saturates to the +maximum signed value. + @findex sqrt @cindex square root diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 4e87d04abaf..217db7a3cdb 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1245,6 +1245,7 @@ simplify_const_unary_operation (enum rtx_code code, enum machine_mode mode, case US_TRUNCATE: case SS_NEG: case US_NEG: + case SS_ABS: return 0; default: