>> I suspect it's going to be even worse if you we have multiple patterns >> with the same underlying RTL, but just different output strings. No. We don't need to add (duplicate) any new patterns. I know RVV GCC very well. I know how to do that. juzhe.zhong@rivai.ai From: Jeff Law Date: 2023-11-18 08:01 To: 钟居哲; palmer CC: gcc-patches; kito.cheng; kito.cheng; cooper.joshua; rdapp.gcc Subject: Re: RISC-V: Support XTheadVector extensions On 11/17/23 16:16, 钟居哲 wrote: > >> I assume this hunk is meant for riscv_output_operand in riscv.cc. We >>>may also need to add '^' to the punct_valid_p hook. But yes, this is >>>the preferred way to go when all we need to do is prefix the instruction >>>with "th.". > > No. I don't think we need to add '^' . I don't want theadvector to touch > any codes > of vector.md. > Mixing up theadvector with RVV1.0 is a nighmare for RVV maintain. > People like me don't want to touch any thing related to Thead. > But anyway, I will take care of that in GCC-15. I suspect it's going to be even worse if you we have multiple patterns with the same underlying RTL, but just different output strings. The standard way to handle that has been with an output modifier and/or ASSEMBLER_DIALECT. If you look at the PA port for example, the assembler syntax changed dramatically between the PA1.0/PA1.1 era and the PA2.0 era. But we support both variants trivially without duplicating all the patterns. But we've got time to sort this out. I don't think the code in question was targeted towards gcc-14. jeff