[Bug middle-end/102153] New: Better expansion of __builtin_*_overflow should be done

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 1 05:34:57 GMT 2021


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

            Bug ID: 102153
           Summary: Better expansion of __builtin_*_overflow should be
                    done
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: internal-improvement, missed-optimization
          Severity: enhancement
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

One thing I noticed is that __builtin_*_overflow is always expanded as:
result = 0;
if (overflow)
  result = 1;

Which then later on get changed to result = overflow during ifcvt or jump
threaded.  Why not instead just use cstore instead.


More information about the Gcc-bugs mailing list