The early out for user-id handling indicated commutative rather than not commutative.
Bootstrapped and tested on x86_64-unkown-linux-gnu, pushed. PR middle-end/108209 * genmatch.cc (commutative_op): Fix return value for user-id with non-commutative first replacement. --- gcc/genmatch.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index fb9e37ae434..d4cb439a851 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -496,7 +496,7 @@ commutative_op (id_base *id) { int res = commutative_op (uid->substitutes[0]); if (res < 0) - return 0; + return -1; for (unsigned i = 1; i < uid->substitutes.length (); ++i) if (res != commutative_op (uid->substitutes[i])) return -1; -- 2.35.3