diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-07-06 11:34:17 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-07-06 11:34:17 +0200 |
commit | 1f6eac9041e87e273c2b955a309ed44364f41544 (patch) | |
tree | 5c06ed10d38755e166140f77dd83928e972b3462 /libgcc/libgcc2.c | |
parent | 5504e5d864f7b9c83727669847396c639abdf77b (diff) | |
download | gcc-1f6eac9041e87e273c2b955a309ed44364f41544.zip gcc-1f6eac9041e87e273c2b955a309ed44364f41544.tar.gz gcc-1f6eac9041e87e273c2b955a309ed44364f41544.tar.bz2 |
re PR target/29776 (result of ffs/clz/ctz/popcount/parity are already sign-extended)
PR target/29776
* fold-const.c (tree_call_nonnegative_warnv_p): Return true
for BUILT_IN_C{LZ,LRSB}*.
* tree.h (CASE_INT_FN): Add FN##IMAX case.
* tree-vrp.c (extract_range_basic): Handle
BUILT_IN_{FFS,PARITY,POPCOUNT,C{LZ,TZ,LRSB}}*. For
BUILT_IN_CONSTANT_P if argument isn't (D) of PARM_DECL,
fall thru to code calling set_value*.
* builtins.c (expand_builtin): Remove *IMAX cases.
(fold_builtin_bitop): For BUILT_IN_CLRSB* return NULL_TREE
if width is bigger than 2*HWI.
* libgcc2.c (__floattisf): Avoid undefined signed overflow.
* gcc.dg/tree-ssa/vrp89.c: New test.
From-SVN: r200731
Diffstat (limited to 'libgcc/libgcc2.c')
-rw-r--r-- | libgcc/libgcc2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c index a47d8af..641bc15 100644 --- a/libgcc/libgcc2.c +++ b/libgcc/libgcc2.c @@ -1571,7 +1571,7 @@ FUNC (DWtype u) /* Otherwise, find the power of two. */ Wtype hi = u >> W_TYPE_SIZE; if (hi < 0) - hi = -hi; + hi = -(UWtype) hi; UWtype count, shift; count_leading_zeros (count, hi); |