Why not just check the prefix is 'v'? I don't think xtheadvector able
to work with other vector stuffs like vector crypto or any other new
vector stuffs, then we don't need extra attribute.

On Thu, Dec 21, 2023 at 12:42 PM Jeff Law <jeffreya...@gmail.com> wrote:
>
>
>
> On 12/20/23 15:48, 钟居哲 wrote:
> >  >> So rather than looking at the mode, would it make more sense to have an
> >>>attribute (or re-use an existing attribute) to identify which opcodes
> >>>are going to need prefixing?  We've got access to the INSN via
> >>>current_output_insn.  So we can lookup attributes trivially.
> >
> > Yes, I totally aggree with Jeff's idea. We have addes many attributes
> > for each RVV instructions.
> > For example, VSETVL PASS is highly depending on those attribute to do
> > the optimizations.
> Also note that with attributes, we can potentially even deal with cases
> where some alternatives need special handling while other alternatives
> simply aren't available with the thead extension.  Not sure if that's
> going to be needed or not, but it's worth remembering.
>
> Jeff

Reply via email to