[Bug tree-optimization/91858] New: [9/10 Regression] Compile time hog w/ complex float trigonometric functions

asolokha at gmx dot com gcc-bugzilla@gcc.gnu.org
Sun Sep 22 19:28:00 GMT 2019


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

            Bug ID: 91858
           Summary: [9/10 Regression] Compile time hog w/ complex float
                    trigonometric functions
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-unknown-linux-gnu

g++-10.0.0-alpha20190915 snapshot (r275736) linked against GNU MP 6.1.2 takes
indefinite time when compiling the following testcase, reduced from
test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp from the
libcxx 9.0.0 test suite, w/ -O1:

template <typename> class yx;

template <typename wk> void
operator== (yx<wk>, yx<wk>);

template <> struct yx<float> {
  yx (_Complex float ph) : lu{ph} { }
  yx (float c0 = 0.0f, float m5 = 0.0f) : lu{c0, m5} { }
  _Complex float lu;
};

template <class um> void
al (yx<um> qo)
{
  _Complex float xy = qo.lu, ny = __builtin_ctanf (xy);
  yx<float> k2 = ny, oi (1);
  k2 == oi;
}

void
al ()
{
  al (yx<float> (10000, 10000));
}

% timeout 10 g++-10.0.0-alpha20190915 -O1 -c ahpihctw.cpp 
zsh: exit 124   timeout 10 g++-10.0.0-alpha20190915 -O1 -c ahpihctw.cpp

Some perf top entries:

  51.41%  libgmp.so.10.3.2  [.] __gmpn_mul_basecase
  15.23%  libgmp.so.10.3.2  [.] __gmpn_sub_n
  11.09%  libgmp.so.10.3.2  [.] __gmpn_add_n
  10.50%  libgmp.so.10.3.2  [.] __gmpn_sqr_basecase
   6.00%  libgmp.so.10.3.2  [.] __gmpn_rsblsh1_n
   1.97%  libgmp.so.10.3.2  [.] 0x00000000000468e3
   1.84%  libgmp.so.10.3.2  [.] __gmpn_lshiftc
   0.69%  libgmp.so.10.3.2  [.] __gmpn_copyi
   0.53%  libgmp.so.10.3.2  [.] __gmpn_lshift
   0.36%  libgmp.so.10.3.2  [.] __gmpn_rsh1sub_n
   0.27%  libgmp.so.10.3.2  [.] __gmpn_bdiv_dbm1c
   0.03%  libgmp.so.10.3.2  [.] 0x00000000000462fb
   0.03%  libgmp.so.10.3.2  [.] 0x000000000003c251
   0.03%  libgmp.so.10.3.2  [.] __gmpn_rsh1add_n

I believe this was already reported somewhere but I failed to find the PR.


More information about the Gcc-bugs mailing list