This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc mainline [RFH] reload of 8-character vector into memory causes bad pattern
- From: Fariborz Jahanian <fjahanian at apple dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Fariborz Jahanian <fjahanian at apple dot com>
- Date: Mon, 24 May 2004 18:26:21 -0700
- Subject: gcc mainline [RFH] reload of 8-character vector into memory causes bad pattern
Following test case exposes a bug in gcc3.5 mainline.
typedef int __attribute__((mode(V8QI))) v8qi;
v8qi V8QI;
v8qi ret_V8QI (void) { return V8QI; };
mygccm5o -c -maltivec bad.c
bad.c:1: warning: specifying vector types with __attribute__ ((mode))
is deprecated
bad.c:1: warning: use __attribute__ ((vector_size)) instead
bad.c: In function `ret_V8QI':
bad.c:5: error: insn does not satisfy its constraints:
(insn 40 71 24 (set (reg:DI 79 v2 [ <result> ])
(mem:DI (plus:SI (reg/f:SI 30 r30)
(const_int 32 [0x20])) [0 S8 A8])) 327
{*movdi_internal32} (nil)
(nil))
bad.c:5: internal compiler error: in final_scan_insn, at final.c:2438
reload generates a non-altivec pattern to load from memory into an
altivec
pseudo register, when following pattern is presented to reload:
(insn 21 20 24 0 (set (reg:DI 79 v2 [ <result> ])
(reg:DI 125 [ <result> ])) 327 {*movdi_internal32} (nil)
(expr_list:REG_DEAD (reg:DI 125 [ <result> ])
(nil)))
which I think is also incorrect for the same reason.
This whole thing starts because of the original pattern generated early
on:
(insn 20 17 21 0 (set (reg:DI 125 [ <result> ])
(subreg:DI (reg:V8QI 118 [ <result> ]) 0)) -1 (nil)
(nil))
(insn 21 20 24 0 (set (reg:DI 79 v2 [ <result> ]) <=== INCORRECT??
(reg:DI 125 [ <result> ])) -1 (nil)
(nil))
Am I correct to assume that the rtl pattern first generated in the
expand phase is incorrect
and fix should be somewhere in one of tree-ssa phases (or the expand
phase)?
- Thanks, fariborz (fjahanian@apple.com).