[Bug target/92140] clang vs gcc optimizing with adc/sbb

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 18 13:43:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92140

--- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> ---
If an insn condition uses can_create_pseudo_p, the insn will suddenly stop
to match after reload --> kaboom.

If your insn always splits ("&& 1"), this means that if any of these:
      NEXT_PASS (pass_lower_subreg3);
      NEXT_PASS (pass_df_initialize_no_opt);
      NEXT_PASS (pass_stack_ptr_mod);
      NEXT_PASS (pass_mode_switching);
      NEXT_PASS (pass_match_asm_constraints);
      NEXT_PASS (pass_sms);
      NEXT_PASS (pass_live_range_shrinkage);
      NEXT_PASS (pass_sched);
      NEXT_PASS (pass_early_remat);
      NEXT_PASS (pass_ira);
      NEXT_PASS (pass_reload);
passes creates a new such insn, you ICE (or worse, do the wrong thing).

That limits exposure quite a bit, but OTOH it is really hard to prove some
of these passes will not create such insns.


More information about the Gcc-bugs mailing list