On Mon, Sep 14, 2020 at 11:47:52AM +0100, Richard Sandiford wrote: > Would it be worth changing the optab so that the input and output are > separate? Having a single operand would be justified if the operation > was only supposed to touch the selected bytes, but most targets wouldn't > guarantee that for memory operands, even as things stand.
You have my vote. > Or maybe the idea was to force the RA's hand by making the input and > output tied even before RA, with separate moves where necessary. > But I'm not sure why vec_set is so special that it requires this > treatment and other optabs don't. Yeah. The register allocator is normally very good in using the same reg in both places, if that is useful. And it also handles the case where your machine insns require the two to be the same pretty well. Not restricting this stuff before RA should be a win. Segher