Vector permutation support for x86
Richard Henderson
rth@redhat.com
Mon Dec 7 19:14:00 GMT 2009
> -;; Note the instruction does not allow the value being added to be a memory
> -;; operation. However by pretending via the nonimmediate_operand predicate
> -;; that it does and splitting it later allows the following to be recognized:
> -;; a[i] = b[i] * c[i] + d[i];
> (define_insn "xop_pmacsww"
> [(set (match_operand:V8HI 0 "register_operand" "=x")
> (plus:V8HI
> (mult:V8HI
> - (match_operand:V8HI 1 "register_operand" "%x")
> + (match_operand:V8HI 1 "nonimmediate_operand" "%x")
> (match_operand:V8HI 2 "nonimmediate_operand" "xm"))
> - (match_operand:V8HI 3 "register_operand" "x")))]
> + (match_operand:V8HI 3 "nonimmediate_operand" "x")))]
I think the comment is still valuable, minus the subclause about
splitting. Because otherwise I would question the use of
nonimmediate_operand in op3.
However, I do not believe that the same applies to any of the
non-multiply-add patterns. E.g.
> (define_insn "xop_pperm"
> [(set (match_operand:V16QI 0 "register_operand" "=x,x")
> (unspec:V16QI
> - [(match_operand:V16QI 1 "register_operand" "x,x")
> + [(match_operand:V16QI 1 "nonimmediate_operand" "x,x")
There's really no reason to accept a memory operand here, AFAICS.
Similarly with all of the patterns that follow.
r~
More information about the Gcc-patches
mailing list