This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ppc prefetch
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: dje at watson dot ibm dot com, gcc at gcc dot gnu dot org
- Cc: rth at redhat dot com
- Date: Wed, 19 Jun 2002 13:13:03 +1000
- Subject: ppc prefetch
hi david. (hi richard)
i just noticed that prefetch in the ppc port is broken after my generic
simd patch.
the problem is V4SI is being used for the prefetch pattern:
(define_insn "prefetch"
[(prefetch (match_operand:V4SI 0 "address_operand" "p")
^^^^^
i assume this is here so you can benefit from the altivec addressing mode
(reg + reg)? if so, we need to come up with an alternate way of doing
this.
[looks... indeed. rth suggested it:
http://gcc.gnu.org/ml/gcc-patches/2002-01/msg01180.html
]
now that V4SI is valid on non altivec targets. i have conditionalized
ALTIVEC_VECTOR_MODE on TARGET_ALTIVEC. this has the side-effect of
unrestricting the V4SI addressing mode, when not altivec. so
rs6000_legitimate_address will no longer restrict V4SI to [reg+reg]
when !TARGET_ALTIVEC.
perhaps we could implement the prefetch pattern with a more restrictive
predicate? if so, i can whip up a patch. i never liked the idea of prefetch
with V4SI in the first place ;-).
aldy