On 6/1/2021 8:21 PM, Ilya Leoshkevich via Gcc-patches wrote:
Bootstrapped and regtested on s390x-redhat-linux.  Ok for master?



Since commit dd1ef00c45ba ("Fix bug in the define_subst handling that
made match_scratch unusable for multi-alternative patterns.") the
workaround for that bug in *ashrdi3_31<setcc><cconly> is not only no
longer necessary, but actually breaks the build.

Get rid of it by using only one alternative in (match_scratch).  It
will be replicated as many times as needed in order to match the
pattern with which (define_subst) is used.

gcc/ChangeLog:

        * config/s390/s390.md(*ashrdi3_31<setcc><cconly>): Use a single
        constraint.
        * config/s390/subst.md(cconly_subst): Use a single constraint
        in (match_scratch).

gcc/testsuite/ChangeLog:

        * gcc.target/s390/ashr.c: New test.
Presumably this fixes:

../../../gcc/gcc/config/s390/s390.md:9335:1: alternative number mismatch: 
operand 0 has 4, operand 1 has 2
../../../gcc/gcc/config/s390/s390.md:9335:1: alternative number mismatch: 
operand 0 has 4, operand 2 has 2
../../../gcc/gcc/config/s390/s390.md:9335:1: wrong number of alternatives in 
the output template
../../../gcc/gcc/config/s390/s390.md:9349:1: alternative number mismatch: 
operand 0 has 4, operand 1 has 2
../../../gcc/gcc/config/s390/s390.md:9349:1: alternative number mismatch: 
operand 0 has 4, operand 2 has 2
../../../gcc/gcc/config/s390/s390.md:9349:1: wrong number of alternatives in 
the output template
../../../gcc/gcc/config/s390/s390.md:9349:1: alternative number mismatch: 
operand 0 has 4, operand 1 has 2
../../../gcc/gcc/config/s390/s390.md:9349:1: alternative number mismatch: 
operand 0 has 4, operand 2 has 2
../../../gcc/gcc/config/s390/s390.md:9349:1: wrong number of alternatives in 
the output template


The tester has been tripping over that for about a week.

I'll let the s390 maintainers chime in on the correctness of the change.

Jeff

Reply via email to