From: Richard Biener Date: Fri, 9 Jan 2015 11:14:55 +0000 (+0000) Subject: re PR tree-optimization/64410 (gcc 25% slower than clang 3.5 for adding complex numbers) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f2782497acb6efa025c1f832a37a0afeb3925f7;p=gcc.git re PR tree-optimization/64410 (gcc 25% slower than clang 3.5 for adding complex numbers) 2015-01-09 Richard Biener PR tree-optimization/64410 * tree-ssa.c (non_rewritable_lvalue_p): Allow REALPART/IMAGPART_EXPR on the LHS. (execute_update_addresses_taken): Deal with that. * tree-ssa-forwprop.c (pass_forwprop::execute): Use component-wise loads/stores for complex variables. * g++.dg/vect/pr64410.cc: New testcase. From-SVN: r219380 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ffea916db29..7289e152af9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2015-01-09 Richard Biener + + PR tree-optimization/64410 + * tree-ssa.c (non_rewritable_lvalue_p): Allow REALPART/IMAGPART_EXPR + on the LHS. + (execute_update_addresses_taken): Deal with that. + * tree-ssa-forwprop.c (pass_forwprop::execute): Use component-wise + loads/stores for complex variables. + 2015-01-09 Martin Liska * ipa-icf-gimple.c (func_checker::compare_ssa_name): Enhance SSA diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b1aff26b889..c962149b1bf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-09 Richard Biener + + PR tree-optimization/64410 + * g++.dg/vect/pr64410.cc: New testcase. + 2015-01-09 Martin Liska * gcc.dg/ipa/ipa-icf-32.c: New test. diff --git a/gcc/testsuite/g++.dg/vect/pr64410.cc b/gcc/testsuite/g++.dg/vect/pr64410.cc new file mode 100644 index 00000000000..6564745dce5 --- /dev/null +++ b/gcc/testsuite/g++.dg/vect/pr64410.cc @@ -0,0 +1,52 @@ +// { dg-do compile } + +#include +#include +#include +#include + +using namespace std; + +int +main(int argc, char** argv) +{ + if (argc < 3) + { + cout << "usage: size N" << endl; + return -1; + } + + const unsigned int size = atoi(argv[1]); + const unsigned int N = atoi(argv[2]); + + cout << "size = " << size << endl; + cout << "N = " << N << endl; + + typedef complex cx_double; + + vector< cx_double > A(size); + vector< cx_double > B(size); + vector< cx_double > C(size); + + cx_double* A_ptr = &A[0]; + cx_double* B_ptr = &B[0]; + cx_double* C_ptr = &C[0]; + + for (unsigned int i=0; i