https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115369
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 = __builtin_mul_overflow (a, b, &r); d += 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.