public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix invalid SImode constant int generated by PA backend
@ 2011-07-15 19:09 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2011-07-15 19:09 UTC (permalink / raw)
  To: gcc-patches

This fixes ICE in combine caused by an invalid constant for SImode.
We should have been using gen_int_mode.  A similar fix was applied
on arm a few months ago.

This is a regression caused by my rewrite of casesi a few years ago.

Other uses of GEN_INT in pa.md need to be reviewed.  I think there
are a few more uses that need to be changed.

Tested on hppa64-hp-hpux11.11.  Committed to 4.5, 4.6 and trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2011-07-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/49723
	* config/pa/pa.md (casesi): Use gen_int_mode instead of GEN_INT.

Index: config/pa/pa.md
===================================================================
--- config/pa/pa.md	(revision 176272)
+++ config/pa/pa.md	(working copy)
@@ -6913,7 +6913,7 @@
     {
       rtx index = gen_reg_rtx (SImode);
 
-      operands[1] = GEN_INT (-INTVAL (operands[1]));
+      operands[1] = gen_int_mode (-INTVAL (operands[1]), SImode);
       if (!INT_14_BITS (operands[1]))
 	operands[1] = force_reg (SImode, operands[1]);
       emit_insn (gen_addsi3 (index, operands[0], operands[1]));

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

only message in thread, other threads:[~2011-07-15 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15 19:09 [committed] Fix invalid SImode constant int generated by PA backend John David Anglin

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