re PR middle-end/81931 (r251260 breaks many tests on powerpc64)
authorAldy Hernandez <aldyh@redhat.com>
Thu, 24 Aug 2017 11:40:55 +0000 (11:40 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 24 Aug 2017 11:40:55 +0000 (11:40 +0000)
PR middle-end/81931
* tree-ssanames.c (get_nonzero_bits): Use element_precision
instead of TYPE_PRECISION.

From-SVN: r251328

gcc/ChangeLog
gcc/tree-ssanames.c

index d448aae131281c6f79bd22efe7aae29ac46697cd..a475c840fa2f9de1ec6ae324862ec14796202c0a 100644 (file)
@@ -1,3 +1,9 @@
+2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR middle-end/81931
+       * tree-ssanames.c (get_nonzero_bits): Use element_precision
+       instead of TYPE_PRECISION.
+
 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
            Alan Hayward  <alan.hayward@arm.com>
            David Sherwood  <david.sherwood@arm.com>
index 676c806c62212fbdc99d501a5aeaafa2527307d4..e48d0860d732a76092bedd5846461d7dca9b8248 100644 (file)
@@ -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);