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