From 98321768552dffe06a24315a06df5ac18d8d0bd8 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 22 Jan 2015 15:43:55 +0100 Subject: [PATCH] re PR rtl-optimization/64688 (internal compiler error: Max. number of generated reload insns per insn is achieved (90)) PR target/64688 PR target/64477 * config/i386/sse.md (vec_set_0): Use (Yi/r/C) constraints for alternative 3. testsuite/ChangeLog: PR target/64688 * g++.dg/pr64688.C: New test. From-SVN: r220000 --- gcc/ChangeLog | 7 ++++ gcc/config/i386/sse.md | 4 +- gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/g++.dg/pr64688.C | 71 ++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/pr64688.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9c1258e22f..82883c1b4ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-22-01 Uros Bizjak + + PR target/64688 + PR target/64477 + * config/i386/sse.md (vec_set_0): Use (Yi/r/C) constraints + for alternative 3. + 2015-01-22 Trevor Saunders PR middle-end/63325 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index ee2d93bdbcb..e19888e4fea 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -6391,11 +6391,11 @@ ;; see comment above inline_secondary_memory_needed function in i386.c (define_insn "vec_set_0" [(set (match_operand:VI4F_128 0 "nonimmediate_operand" - "=Yr,*v,v,v ,x,x,v,Yr ,*x ,x ,m ,m ,m") + "=Yr,*v,v,Yi,x,x,v,Yr ,*x ,x ,m ,m ,m") (vec_merge:VI4F_128 (vec_duplicate:VI4F_128 (match_operand: 2 "general_operand" - " Yr,*v,m,*r,m,x,v,*rm,*rm,*rm,!x,!*re,!*fF")) + " Yr,*v,m,r ,m,x,v,*rm,*rm,*rm,!x,!*re,!*fF")) (match_operand:VI4F_128 1 "vector_move_operand" " C , C,C,C ,C,0,v,0 ,0 ,x ,0 ,0 ,0") (const_int 1)))] diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 78b7a839697..8e6dadc2d43 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-22-01 Uros Bizjak + + PR target/64688 + * g++.dg/pr64688.C: New test. + 2015-01-22 Ilya Enkovich * gcc.target/i386/chkp-always_inline.c (f1): Make static diff --git a/gcc/testsuite/g++.dg/pr64688.C b/gcc/testsuite/g++.dg/pr64688.C new file mode 100644 index 00000000000..3525e49b735 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr64688.C @@ -0,0 +1,71 @@ +// { dg-do compile { target i?86-*-* x86_64-*-* } } +// { dg-options "-std=c++11 -O3 -march=westmere" } + +template struct A { typedef typename T::next type; }; +template struct B; +template struct N : T {}; +template struct C { + static const int value = N; + typedef C next; +}; +template +struct R : N::template P> {}; +template struct O : Base { + typedef typename A::type size; +}; +template struct D { + typedef int tag; + typedef C<0> size; +}; +template <> struct B { + template struct P : O>>>::size {}; +}; +template struct F; +template struct G; +template struct H; +template struct H {}; +template unsigned char at_c(H) {} +template class I; +template class J; +template class K; +template struct Q; +struct L { + typedef Q>>>>> *type; +}; +template struct M { typedef K>> view_t; }; +template +struct Q : H, R>>>>::value> {}; +template struct G> { typedef Iterator type; }; +template class J { +public: + typedef G *>>::type x_iterator; +}; +template class K { +public: + J::x_iterator row_begin(int); +}; +template void measure_time(Op p1) { p1(); } +template struct fill_nongil_t; +template +struct fill_nongil_t>>>>> *>>>, P> { + typedef K>>>>> *>>> View; + View _v; + P _p; + fill_nongil_t(View, P); + void operator()() { + T *first = (T *)_v.row_begin(0); + T last; + while (first != &last) { + first[0] = first[1] = at_c<1>(_p); + first[2] = at_c<2>(_p); + first += 3; + } + } +}; +template void test_fill(int) { + M::view_t __trans_tmp_1; + measure_time(fill_nongil_t>>>>> *>>>, + Q>>>>>>( + __trans_tmp_1, Q>>>>>())); +} +void performance_testtest_method() { test_fill, Q>(0); } -- 2.30.2