From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D08093854803; Mon, 23 Nov 2020 20:26:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D08093854803 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97950] Unoptimal code generation with __builtin_*_overflow{,_p} for short and __int128 Date: Mon, 23 Nov 2020 20:26:52 +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: 11.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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: Mon, 23 Nov 2020 20:26:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97950 --- Comment #3 from Uro=C5=A1 Bizjak --- Comment on attachment 49613 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49613 gcc11-pr97950.patch >+(define_insn_and_split "*setcc_hi_1" >+ [(set (match_operand:HI 0 "register_operand" "=3Dq") >+ (match_operator:HI 1 "ix86_comparison_operator" >+ [(reg FLAGS_REG) (const_int 0)]))] >+ "!TARGET_PARTIAL_REG_STALL" >+ "#" >+ "&& reload_completed" >+ [(set (match_dup 2) (match_dup 1)) >+ (set (match_dup 0) (zero_extend:DI (match_dup 2)))] zero_extend:HI Perhaps you could apply SWI24 mode iterator to existing *setcc_si_1_and and *setcc_si_1_movzbl?=