public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR86841
@ 2018-08-17  9:26 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2018-08-17  9:26 UTC (permalink / raw)
  To: gcc-patches


Applied as obvious.

Richard.

2018-08-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/86841
	* wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.

Index: gcc/wide-int-range.cc
===================================================================
--- gcc/wide-int-range.cc	(revision 263613)
+++ gcc/wide-int-range.cc	(working copy)
@@ -323,7 +323,7 @@ wide_int_range_lshift (wide_int &res_lb,
   /* Transform left shifts by constants into multiplies.  */
   if (wi::eq_p (vr1_lb, vr1_ub))
     {
-      int shift = wi::extract_uhwi (vr1_ub, 0, vr1_ub.get_precision ());
+      unsigned shift = vr1_ub.to_uhwi ();
       wide_int tmp = wi::set_bit_in_zero (shift, prec);
       return wide_int_range_multiplicative_op (res_lb, res_ub,
 					       MULT_EXPR, sign, prec,

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

only message in thread, other threads:[~2018-08-17  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-17  9:26 [PATCH] Fix PR86841 Richard Biener

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).