This is the mail archive of the gcc-bugs@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]

[Bug target/15289] reload error with big-endian subregs


------- Additional Comments From amodra at bigpond dot net dot au  2004-05-05 14:24 -------
This:
(insn 16 15 17 0 (set (reg:SI 9 9 [129])
        (zero_extend:SI (subreg:QI (reg:SI 0 0 [128]) 2))) 18 {*rs6000.md:508}
(insn_list 13 (nil))
    (nil))

gets turned into
(insn 64 15 16 0 (set (reg:QI 10 10)
        (reg:QI 0 0)) -1 (nil)
    (nil))

(insn 16 64 17 0 (set (reg:SI 9 9 [129])
        (zero_extend:SI (reg:QI 10 10))) 18 {*rs6000.md:508} (insn_list 13 (nil))
    (nil))

Jan, http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00882.html added the code to
reload that made a reload necessary for (subreg:QI (reg:SI 0 0 [128]) 2) with
the hunk
*************** find_reloads (insn, replace, ind_levels,
*** 2869,2874 ****
--- 2876,2887 ----
  	      if (GET_CODE (SUBREG_REG (operand)) == REG
  		  && REGNO (SUBREG_REG (operand)) < FIRST_PSEUDO_REGISTER)
  		{
+ 		  if (!subreg_offset_representable_p
+ 			(REGNO (SUBREG_REG (operand)),
+ 			 GET_MODE (SUBREG_REG (operand)),
+ 			 SUBREG_BYTE (operand),
+ 			 GET_MODE (operand)))
+ 		     force_reload = 1;
  		  offset += subreg_regno_offset (REGNO (SUBREG_REG (operand)),
  						 GET_MODE (SUBREG_REG (operand)),
  						 SUBREG_BYTE (operand),


-- 


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


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