This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA (vax): Fix PR46740
Quoting Richard Henderson <rth@redhat.com>:
On 12/06/2010 09:21 AM, Joern Rennecke wrote:
+#else
+ gcc_assert (hval == 0);
Does it cause more problems to simply transform that #if
into a normal C if? Nothing in that block looks as if it
would generate a warning on a 64-bit host...
Indeed, that builds fine too.
Although n could be larger than than 31+26 at runtime, we
wouldn't execute the out-of-range shift.
2010-12-06 Joern Rennecke <amylaar@spamcop.net>
Richard Henderson <rth@redhat.com>
PR target/46740
* config/vax/vax.c (vax_output_int_move): Fold #if into if.
Index: config/vax/vax.c
===================================================================
--- config/vax/vax.c (revision 167494)
+++ config/vax/vax.c (working copy)
@@ -1129,18 +1129,16 @@ vax_output_int_move (rtx insn ATTRIBUTE_
{
lval >>= n;
-#if HOST_BITS_PER_WIDE_INT == 32
/* On 32bit platforms, if the 6bits didn't overflow into the
upper 32bit value that value better be 0. If we have
overflowed, make sure it wasn't too much. */
- if (hval != 0)
+ if (HOST_BITS_PER_WIDE_INT == 32 && hval != 0)
{
if (n <= 26 || hval >= ((unsigned)1 << (n - 26)))
n = 0; /* failure */
else
lval |= hval << (32 - n);
}
-#endif
/* If n is 0, then ashq is not the best way to emit this. */
if (n > 0)
{