[Bug target/86819] New: Set min_divisions_for_recip_mul to 2

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 1 14:40:00 GMT 2018


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

            Bug ID: 86819
           Summary: Set min_divisions_for_recip_mul to 2
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org
  Target Milestone: ---
            Target: x86_64-*-*

On a modern x86_64, multiplications are super fast and divisions are much
slower, so as soon as we have 2 divisions by the same number, it is faster to
precompute the inverse. There is TARGET_MIN_DIVISIONS_FOR_RECIP_MUL for this
purpose, I believe we should use it to set the threshold to 2 (the default is
3).


More information about the Gcc-bugs mailing list