This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] for PR 26247 and 26248
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Feb 2006 13:12:16 +0100
- Subject: [patch] for PR 26247 and 26248
Hello,
there are several objects that may be assigned to and whose mode is
VOIDmode (pc in PR 26248, strict_low_part of something in PR 26247).
While in both cases it is possible to move the invariant, it would
need some special handling (in particular, gen_move_insn does not
handle them properly). For now, it is simpler to just avoid touching
such insns.
Bootstrapped & regtested on ia64. I have verified that the ICEs are
fixed from the crosscompiler.
Zdenek
PR rtl-optimization/26247
PR rtl-optimization/26248
* loop-invariant.c (may_assign_reg_p): Do not allow VOIDmode.
Index: loop-invariant.c
===================================================================
*** loop-invariant.c (revision 110898)
--- loop-invariant.c (working copy)
*************** find_exits (struct loop *loop, basic_blo
*** 582,589 ****
static bool
may_assign_reg_p (rtx x)
{
! return (can_copy_p (GET_MODE (x))
&& GET_MODE (x) != BLKmode
&& (!REG_P (x)
|| !HARD_REGISTER_P (x)
|| REGNO_REG_CLASS (REGNO (x)) != NO_REGS));
--- 585,593 ----
static bool
may_assign_reg_p (rtx x)
{
! return (GET_MODE (x) != VOIDmode
&& GET_MODE (x) != BLKmode
+ && can_copy_p (GET_MODE (x))
&& (!REG_P (x)
|| !HARD_REGISTER_P (x)
|| REGNO_REG_CLASS (REGNO (x)) != NO_REGS));