diff mbox

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

Message ID 20110715182250.GA25631@hiauly1.hia.nrc.ca
State New
Headers show

Commit Message

John David Anglin July 15, 2011, 6:22 p.m. UTC
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
diff mbox

Patch

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