From: Aldy Hernandez Date: Thu, 24 Aug 2017 11:40:55 +0000 (+0000) Subject: re PR middle-end/81931 (r251260 breaks many tests on powerpc64) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4f22d970ec86797c202c327ff3fffdb56a4b6a3;p=gcc.git re PR middle-end/81931 (r251260 breaks many tests on powerpc64) PR middle-end/81931 * tree-ssanames.c (get_nonzero_bits): Use element_precision instead of TYPE_PRECISION. From-SVN: r251328 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d448aae1312..a475c840fa2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-08-24 Aldy Hernandez + + PR middle-end/81931 + * tree-ssanames.c (get_nonzero_bits): Use element_precision + instead of TYPE_PRECISION. + 2017-08-24 Richard Sandiford Alan Hayward David Sherwood diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 676c806c622..e48d0860d73 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -470,7 +470,9 @@ get_nonzero_bits (const_tree name) if (TREE_CODE (name) == INTEGER_CST) return name; - unsigned int precision = TYPE_PRECISION (TREE_TYPE (name)); + /* Use element_precision instead of TYPE_PRECISION so complex and + vector types get a non-zero precision. */ + unsigned int precision = element_precision (TREE_TYPE (name)); if (POINTER_TYPE_P (TREE_TYPE (name))) { struct ptr_info_def *pi = SSA_NAME_PTR_INFO (name);