diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-07 09:52:38 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-07 09:52:38 +0000 |
commit | cce092242248d6efa23a8c9c87f3723194102af5 (patch) | |
tree | 5610015ab1a2cf641d6417f9a4f4d4f6822e8a97 | |
parent | 8cafe2834ebdcac360743afe5baea3ee00b1773e (diff) | |
download | gcc-cce092242248d6efa23a8c9c87f3723194102af5.tar.gz |
2015-05-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/66002
* passes.def: Schedule another pass_merge_phi after ifcombine, right
before phiopt.
* gcc.dg/vect/vect-125.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222873 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/passes.def | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-125.c | 20 |
4 files changed, 32 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index beabbcb5fa0..c294b014d62 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/66002 + * passes.def: Schedule another pass_merge_phi after ifcombine, right + before phiopt. + 2015-05-07 Marek Polacek <polacek@redhat.com> Martin Uecker <uecker@eecs.berkeley.edu> diff --git a/gcc/passes.def b/gcc/passes.def index 32213e8561c..4690e23afb2 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -177,6 +177,7 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_cselim); NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_tree_ifcombine); + NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_ch); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d4d52638150..69cb4ffd56c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/66002 + * gcc.dg/vect/vect-125.c: New testcase. + 2015-05-07 Marek Polacek <polacek@redhat.com> Martin Uecker <uecker@eecs.berkeley.edu> diff --git a/gcc/testsuite/gcc.dg/vect/vect-125.c b/gcc/testsuite/gcc.dg/vect/vect-125.c new file mode 100644 index 00000000000..f6ffef5c42e --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-125.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_int_mult } */ +/* { dg-require-effective-target vect_pack_trunc } */ +/* { dg-require-effective-target vect_unpack } */ + +void train(short *t, short *w, int n, int err) +{ + n=(n+7)&-8; + for (int i=0; i<n; ++i) + { + int wt=w[i]+((t[i]*err*2>>16)+1>>1); + if (wt<-32768) wt=-32768; + if (wt>32767) wt=32767; + w[i]=wt; + } +} + +/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ |