From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B8D46385802E; Thu, 24 Feb 2022 12:12:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8D46385802E From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103353] Indefinite recursion when compiling -mmma requiring testcase w/ -maltivec Date: Thu, 24 Feb 2022 12:12:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Feb 2022 12:12:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103353 --- Comment #7 from Segher Boessenkool --- (In reply to Kewen Lin from comment #5) > (In reply to Segher Boessenkool from comment #4) > > You miss all extra errors the expand_call can generate. This is the ge= neral > > reason why we try to continue instead of stopping after the first error= . The > > reason is that later errors may be more obvious to the user. This of c= ourse > > does no longer work so well because our errors now take 30 lines instea= d of > > 1. >=20 > Thanks for the explanation! One consequent question is that this point can > be applied for the other places where some expected conditions don't hold > for bif expansion, but I saw the other places are using "return const0_rt= x". > Is there something special causing this difference? Not really, no. In general we try to continue a bit longer (like, evaluate the arguments, as here). This gives much better diagnostics to the user. = In a few cases you just have to give up early though, for practical reasons. > > It probably is best if the generic opaque-mode emit_move code does not = try > > to move it via some other mode_class. Peter? > >=20 > > Failing that, we can work around it by having move patterns for those m= odes > > always, but hard erroring on them (FAIL is no good). >=20 > Yeah, one workround can help the ICE gone: (similar thing needed for XOmo= de > as well): >=20 > diff --git a/gcc/config/rs6000/mma.md b/gcc/config/rs6000/mma.md > index 907c9d6d516..04e887ad147 100644 > --- a/gcc/config/rs6000/mma.md > +++ b/gcc/config/rs6000/mma.md > @@ -268,10 +268,12 @@ (define_int_attr avvi4i4i4 [(UNSPEC_MMA_PMXVI8GER4P= P=20=20 > "pmxvi8ger4pp") > (define_expand "movoo" > [(set (match_operand:OO 0 "nonimmediate_operand") > (match_operand:OO 1 "input_operand"))] > - "TARGET_MMA" > + "" > { > - rs6000_emit_move (operands[0], operands[1], OOmode); > - DONE; > + if (TARGET_MMA) { > + rs6000_emit_move (operands[0], operands[1], OOmode); > + DONE; > + } > }) Like that. But with a big fat comment, what is done when !TARGET_MMA, and why we do that. It is arguably the completely wrong thing to do for opaque modes.=