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

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


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