[PATCH] rs6000: MMA test case emits wrong code when building a vector pair

Peter Bergner bergner@linux.ibm.com
Tue Nov 16 18:18:50 GMT 2021

On 11/13/21 7:25 AM, Segher Boessenkool wrote:
> On Wed, Oct 27, 2021 at 08:37:57PM -0500, Peter Bergner wrote:
>> PR102976 shows a test case where we generate wrong code when building
>> a vector pair from 2 vector registers.  The bug here is that with unlucky
>> register assignments, we can clobber one of the input operands before
>> we write both registers of the output operand.  The solution is to use
>> early-clobbers in the assemble pair and accumulator patterns.
> Because of what insns there are after the split.  Aha.
> Please add a comment explaining this, near the earlyclobber itself.

Done for both patterns.

> You can just write this as {\mxxlor \d+,44,44\M} etc., that will be
> simplest I think.

Done and tested that it still works.

> Okay for trunk with comments added near the earlyclobber, and the RE
> improved.  Also fine for 11 after some burn-in.  Thanks!

Ok, I pushed with both changes.  I'll push a change to GCC11 in a few days.


More information about the Gcc-patches mailing list