From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D11B3A25D35; Thu, 6 Jun 2024 07:49:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D11B3A25D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717660190; bh=opCFOhe4TTYp3tGbUhjBI8pS0HMdsHpD3On1ggCnFRs=; h=From:To:Subject:Date:From; b=YY1+wu3iP0yFh+BuYN732tqsANiB4Wd1aRFt/aNZ//zGb7QQaRgxvvTw4s41iB5aV Uz86bLsOkvbtjb4122boZckP79Mmnz3eeZD2d1tbYA5AnD3HU0IRocQPaS05hK+I6d Bcc8+FJO8818GcREbUIJ+gyzrhUkFo0d9PBqjano= From: "liuhongt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/115369] New: ifcvt failed to condition elimination for__builtin_mul_overflow Date: Thu, 06 Jun 2024 07:49:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: liuhongt at gcc dot gnu.org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115369 Bug ID: 115369 Summary: ifcvt failed to condition elimination for__builtin_mul_overflow Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: liuhongt at gcc dot gnu.org Target Milestone: --- int foo (unsigned a, unsigned b, unsigned d, unsigned e, int* p) { unsigned int r; int c =3D __builtin_mul_overflow (a, b, &r); d +=3D c; return c ? d : e; } (jump_insn 14 13 47 2 (set (pc) (if_then_else (eq (reg:CCO 17 flags) (const_int 0 [0])) (label_ref 17) (pc))) "/app/example.c":5:13 1212 {*jcc} (expr_list:REG_DEAD (reg:CCO 17 flags) (int_list:REG_BR_PROB 536868 (nil))) -> 17) (note 47 14 17 3 [bb 3] NOTE_INSN_BASIC_BLOCK) ; pc falls through to BB 5 (code_label 17 47 40 4 3 (nil) [1 uses]) (note 40 17 29 4 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn 29 40 30 4 (parallel [ (set (reg/v:SI 105 [ e ]) (plus:SI (reg/v:SI 104 [ d ]) (const_int 1 [0x1]))) (clobber (reg:CC 17 flags)) ]) "/app/example.c":6:7 272 {*addsi_1} (expr_list:REG_DEAD (reg/v:SI 104 [ d ]) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil)))) (code_label 30 29 31 5 4 (nil) [0 uses]) (note 31 30 36 5 [bb 5] NOTE_INSN_BASIC_BLOCK) (insn 36 31 37 5 (set (reg/i:SI 0 ax) (reg/v:SI 105 [ e ])) "/app/example.c":8:1 85 {*movsi_internal} (expr_list:REG_DEAD (reg/v:SI 105 [ e ]) (nil))) (insn 37 36 0 5 (use (reg/i:SI 0 ax)) "/app/example.c":8:1 -1 (nil)) The ce2 dump looks quite simple, not sure why it failed.=