This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix invalid SImode constant int generated by PA backend


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]));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]