From e4f22d970ec86797c202c327ff3fffdb56a4b6a3 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Thu, 24 Aug 2017 11:40:55 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssanames.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d448aae..a475c84 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 676c806..e48d086 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); -- 2.7.4