public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wide-int] fixed several regressions in branch.
@ 2014-01-15  1:27 Kenneth Zadeck
  0 siblings, 0 replies; only message in thread
From: Kenneth Zadeck @ 2014-01-15  1:27 UTC (permalink / raw)
  To: Mike Stump, Richard Sandiford, Richard Biener, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

This patch fixes what appears to have been a long standing failure in 
the conversion of tree-vect-generic.c:build_replicated_const. This 
failure caused several regressions on the branch.

Committed as revision 206616

[-- Attachment #2: fix1.diff --]
[-- Type: text/x-patch, Size: 573 bytes --]

Index: gcc/tree-vect-generic.c
===================================================================
--- gcc/tree-vect-generic.c	(revision 206609)
+++ gcc/tree-vect-generic.c	(working copy)
@@ -57,7 +57,8 @@ static tree
 build_replicated_const (tree type, tree inner_type, HOST_WIDE_INT value)
 {
   int width = tree_to_uhwi (TYPE_SIZE (inner_type));
-  int n = TYPE_PRECISION (type) / width;
+  int n = (TYPE_PRECISION (type) + HOST_BITS_PER_WIDE_INT - 1) 
+    / HOST_BITS_PER_WIDE_INT;
   unsigned HOST_WIDE_INT low, mask;
   HOST_WIDE_INT a[WIDE_INT_MAX_ELTS];
   int i;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-15  1:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-15  1:27 [wide-int] fixed several regressions in branch Kenneth Zadeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).