[Bug middle-end/36447] simplify_subreg ICE with right shift more than length type AVR

hutchinsonandy at aim dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 6 11:56:00 GMT 2008



------- Comment #3 from hutchinsonandy at aim dot com  2008-06-06 11:55 -------
Subject: Re:  simplify_subreg ICE with right shift more than
 length type AVR

Thanks for quick response,

I will give this a try and no doubt it will work.
I was trying to think of how the other case should be simplified, 
rather than left as shift.

or put another way, how should we take sign?


Andy



----------------------------------------------
Sent from my Dingleberry wired device.


-----Original Message-----
From: bonzini at gnu dot org <gcc-bugzilla@gcc.gnu.org>
To: hutchinsonandy@aim.com
Sent: Fri, 6 Jun 2008 1:04 am
Subject: [Bug middle-end/36447] simplify_subreg ICE with right shift 
more than length type AVR




------- Comment #2 from bonzini at gnu dot org  2008-06-06 05:04 -------
Can you try and possibly submit this patch:

Index: /Users/bonzinip/cvs/gcc/gcc/simplify-rtx.c
===================================================================
--- /Users/bonzinip/cvs/gcc/gcc/simplify-rtx.c  (revision 134435)
+++ /Users/bonzinip/cvs/gcc/gcc/simplify-rtx.c  (working copy)
@@ -5247,6 +5247,7 @@ simplify_subreg (enum machine_mode outer
        && GET_MODE_BITSIZE (innermode) >= (2 * GET_MODE_BITSIZE 
(outermode))
       && GET_CODE (XEXP (op, 1)) == CONST_INT
        && (INTVAL (XEXP (op, 1)) & (GET_MODE_BITSIZE (outermode) - 1)) 
== 0
+      && INTVAL (XEXP (op, 1)) < GET_MODE_BITSIZE (innermode)
       && byte == subreg_lowpart_offset (outermode, innermode))
     {
       int shifted_bytes = INTVAL (XEXP (op, 1)) / BITS_PER_UNIT;

Thanks!


--

bonzini at gnu dot org changed:

           What    |Removed                     |Added
-------------------------------------------------------------------------
---
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-06 05:04:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36447

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36447



More information about the Gcc-bugs mailing list