On Fri, 20 Nov 2020, Jeff Law wrote: > ps. Yes, I skipped the insv/extv changes. They're usually a rats nest > of special cases. We'll come back to them.
I've thought of actually reducing the number of patterns to the minimum possible by folding the existing ones together, and then getting the alternatives sorted by fine-grained constraints at reload. There is that complication caused by INSV machine instruction preserving condition codes (understandably), so keeping it together with alternative code sequences that do set the codes in a single RTL insn would cause trouble with getting a matching insn for the comparison elimination pass. Or so I think. As you say, we can sort it later. It's an optimisation only anyway, the VAX EXTV/EXTZV/INSV machine instructions are flexible enough to handle just about anything, except that reportedly at a slow pace, at least with some implementations (I'd have to review that NVAX manual for the details, but it's hefty 1022 pages). So at worst we could use those instructions in all cases. Maciej