[3.4/head] fix alphaev4 execute/simd-2.c
Richard Henderson
rth@redhat.com
Mon Jan 19 20:32:00 GMT 2004
Reload gave us (subreg:HI (reg:V8HI xx) y), where xx is a pseudo.
The problem here is that the assert for MEM is wrong; reload is
allowed to give us pseudos at this stage. The bits in
aligned_memory_operand already look through the pseudo. A bit
of improvement is to use MEM_ALIGN data. I'm not sure that's
critical to fixing the bug or not; didn't actually try without.
r~
* config/alpha/alpha.c (aligned_memory_operand): Check MEM_ALIGN,
don't check memory mode.
(unaligned_memory_operand): Likewise.
(reload_inqi, reload_inhi, reload_outqi, reload_outhi): Don't
abort for op0 not MEM.
Index: alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.342.4.1
diff -c -p -d -r1.342.4.1 alpha.c
*** alpha.c 19 Jan 2004 09:53:45 -0000 1.342.4.1
--- alpha.c 19 Jan 2004 19:36:28 -0000
*************** aligned_memory_operand (rtx op, enum mac
*** 1219,1227 ****
}
}
! if (GET_CODE (op) != MEM
! || GET_MODE (op) != mode)
return 0;
op = XEXP (op, 0);
/* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo)
--- 1219,1228 ----
}
}
! if (GET_CODE (op) != MEM)
return 0;
+ if (MEM_ALIGN (op) >= 32)
+ return 1;
op = XEXP (op, 0);
/* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo)
*************** unaligned_memory_operand (rtx op, enum m
*** 1261,1268 ****
}
}
! if (GET_CODE (op) != MEM
! || GET_MODE (op) != mode)
return 0;
op = XEXP (op, 0);
--- 1262,1270 ----
}
}
! if (GET_CODE (op) != MEM)
! return 0;
! if (MEM_ALIGN (op) >= 32)
return 0;
op = XEXP (op, 0);
Index: alpha.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
retrieving revision 1.215.6.1
diff -c -p -d -r1.215.6.1 alpha.md
*** alpha.md 19 Jan 2004 09:53:46 -0000 1.215.6.1
--- alpha.md 19 Jan 2004 19:36:28 -0000
***************
*** 6008,6016 ****
{
rtx scratch, seq;
- if (GET_CODE (operands[1]) != MEM)
- abort ();
-
if (aligned_memory_operand (operands[1], QImode))
{
seq = gen_reload_inqi_help (operands[0], operands[1],
--- 6010,6015 ----
***************
*** 6045,6053 ****
{
rtx scratch, seq;
- if (GET_CODE (operands[1]) != MEM)
- abort ();
-
if (aligned_memory_operand (operands[1], HImode))
{
seq = gen_reload_inhi_help (operands[0], operands[1],
--- 6044,6049 ----
***************
*** 6080,6088 ****
(match_operand:TI 2 "register_operand" "=&r")])]
"! TARGET_BWX"
{
- if (GET_CODE (operands[0]) != MEM)
- abort ();
-
if (aligned_memory_operand (operands[0], QImode))
{
emit_insn (gen_reload_outqi_help
--- 6076,6081 ----
***************
*** 6115,6123 ****
(match_operand:TI 2 "register_operand" "=&r")])]
"! TARGET_BWX"
{
- if (GET_CODE (operands[0]) != MEM)
- abort ();
-
if (aligned_memory_operand (operands[0], HImode))
{
emit_insn (gen_reload_outhi_help
--- 6108,6113 ----
More information about the Gcc-patches
mailing list