This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ambiguous insn in altivec
- From: Daniel Berlin <dan at dberlin dot org>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 8 Jan 2002 14:29:53 -0500 (EST)
- Subject: Re: ambiguous insn in altivec
On Tue, 8 Jan 2002, Aldy Hernandez wrote:
> dan
>
> is there a reason for the second insn? you added this.
Yes, if you look closely, you'll note one works on floats, one works on
integers.
Since we have no conversions from v4sf to v4si, without the second insn,
we couldn't do splats into vector floats.
>
> aldy
>
> (define_insn "altivec_vspltisw"
> [(set (match_operand:V4SI 0 "register_operand" "=v")
> (unspec:V4SI [(match_operand:QI 1 "immediate_operand" "i")] 141))]
> "TARGET_ALTIVEC"
> "vspltisw %0, %1"
> [(set_attr "type" "vecsimple")])
>
> (define_insn ""
> [(set (match_operand:V4SF 0 "register_operand" "=v")
> (unspec:V4SF [(match_operand:QI 1 "immediate_operand" "i")] 142))]
> "TARGET_ALTIVEC"
> "vspltisw %0, %1"
> [(set_attr "type" "vecsimple")])
>