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]

[patch] for PR 26225


Hello,

there is nothing in loop-invariant that prevents BLKmode expressions
(read-only MEMs) from being recognized as invariant.  However, this
causes us to attempt to create BLKmode registers for them, which leads to
ICE.  This patch makes us ignore BLKmode expressions in loop-invariant.

Bootstrapped & regtested on ia64.  Reported to fix build failure on
hppa.  Commited as obvious.

Zdenek

	PR rtl-optimization/26225
	* loop-invariant.c (may_assign_reg_p): Do not allow BLKmode operands.

Index: loop-invariant.c
===================================================================
*** loop-invariant.c	(revision 110850)
--- loop-invariant.c	(working copy)
*************** static bool
*** 583,588 ****
--- 583,589 ----
  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));


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