This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53385] [4.8 Regression] "Error: operand out of range" after changes for LSHIFT_EXPR in vrp.c
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 May 2012 08:24:40 +0000
- Subject: [Bug tree-optimization/53385] [4.8 Regression] "Error: operand out of range" after changes for LSHIFT_EXPR in vrp.c
- Auto-submitted: auto-generated
- References: <bug-53385-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53385
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-18 08:24:40 UTC ---
So I think you could do:
case 'W':
/* MB value for a PowerPC64 rldic operand. */
i = clz_hwi (GET_CODE (x) == CONST_INT
? INTVAL (x) : CONST_DOUBLE_HIGH (x));
#if HOST_BITS_PER_WIDE_INT == 32
if (GET_CODE (x) == CONST_INT && i)
i += 32; /* zero-extend high-part was all 0's */
else if (GET_CODE (x) == CONST_DOUBLE && i == 32)
i = clz_hwi (CONST_DOUBLE_LOW (x)) + 32;
#endif
fprintf (file, "%d", i);
return;