[Bug tree-optimization/58508] New: Redundant vector load of "actual" loop invariant in loop body.

2013-09-23 Thread congh at google dot com
ty: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com When GCC vectorizes the loop below, it will firstly do loop versioning with aliasing check on a and b. Since a and b have different stride

[Bug tree-optimization/58513] New: *var and MEM[(const int &)var] (var has int* type) are not treated as the same data ref.

2013-09-23 Thread congh at google dot com
RMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com First look at the code below: int op (const int& x, const int& y) { return x + y; } void foo(int* a) { for (

[Bug tree-optimization/58686] New: [BUG] vect_get_loop_niters() cound not get the correct result for some loops.

2013-10-10 Thread congh at google dot com
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com Look at the following loop: unsigned int t = ...; do { ... t -= 4; } while (t >= 5); When I tried to get the iterat

[Bug tree-optimization/58686] vect_get_loop_niters() fails for some loops

2013-10-11 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58686 --- Comment #2 from Cong Hou --- I think this issue is more like a missed optimization. If the iteration number can be calculated as a constant value at compile time, then the function assert_loop_rolls_lt() won't be called due to an early exit

[Bug tree-optimization/58728] New: [missed optimization] == or != comparisons may affect range test optimization.

2013-10-14 Thread congh at google dot com
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com Created attachment 31002 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31002&action=edit Patch Look at the following code

[Bug tree-optimization/58728] [missed optimization] == or != comparisons may affect range test optimization.

2013-10-21 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58728 --- Comment #1 from Cong Hou --- Any comment on this? thanks, Cong

[Bug tree-optimization/58508] [Missed-Optimization] Redundant vector load of "actual" loop invariant in loop body.

2013-10-28 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58508 --- Comment #5 from Cong Hou --- I guess I should add /* { dg-require-effective-target vect_int } */ to the test case. It is right?

[Bug tree-optimization/58508] [Missed-Optimization] Redundant vector load of "actual" loop invariant in loop body.

2013-10-29 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58508 --- Comment #7 from Cong Hou --- OK. I made a new patch to fix this problem. Waiting to be approved. thanks, Cong diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9d0f4a5..3d9916d 100644 --- a/gcc/testsuite/ChangeLog +++ b

[Bug tree-optimization/58915] New: [missed optimization] GCC fails to get the loop bound for some loops.

2013-10-29 Thread congh at google dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com Getting the correct loop upper bound is important for some optimizations. GCC tries to get this bound by calling bound_difference() in tree-ssa

[Bug tree-optimization/58915] [missed optimization] GCC fails to get the loop bound for some loops.

2013-10-30 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58915 --- Comment #2 from Cong Hou --- I am afraid that get_range_info () has little use here. The value range we care about may only exist under specific conditions and is hence flow sensitive. For example, we may need the value range of n in the if bo

[Bug c++/58963] New: Does C++ need flag_complex_method = 2?

2013-11-01 Thread congh at google dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com In the patch http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00560.html, the builtin function is used to perform complex multiplication and division. This is to comply with C99 standard, but I am wondering if C

[Bug tree-optimization/56764] vect_prune_runtime_alias_test_list not smart enough

2013-11-07 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56764 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #2 from

[Bug c++/58963] Does C++ need flag_complex_method = 2?

2013-11-08 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58963 --- Comment #1 from Cong Hou --- Any comment on this topic? thanks, Cong

[Bug tree-optimization/56717] Enhance Dot-product pattern recognition to avoid mult widening.

2013-11-08 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56717 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #1 from

[Bug tree-optimization/56717] Enhance Dot-product pattern recognition to avoid mult widening.

2013-11-08 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56717 --- Comment #2 from Cong Hou --- I examined the GCC generated code, and found the main problem is that the load of 'scale' (rhs operand of >>) to an xmm register is in the loop body, which could be moved outside. This happened during rtl-reload p

[Bug tree-optimization/56902] Fails to SLP with mismatched +/- and negatable constants

2013-11-11 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56902 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #1 from

[Bug tree-optimization/53947] [meta-bug] vectorizer missed-optimizations

2013-11-11 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 Bug 53947 depends on bug 58508, which changed state. Bug 58508 Summary: [Missed-Optimization] Redundant vector load of "actual" loop invariant in loop body. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58508 What|Removed

[Bug tree-optimization/58508] [Missed-Optimization] Redundant vector load of "actual" loop invariant in loop body.

2013-11-11 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58508 Cong Hou changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/59050] [4.9 Regression] ICE: tree check: expected integer_cst, have nop_expr in tree_int_cst_lt, at tree.c:7083

2013-11-11 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050 Cong Hou changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/58963] Does C++ need flag_complex_method = 2?

2013-11-14 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58963 --- Comment #3 from Cong Hou --- Suppose there is a third-party complex library, which is written in the same way as . Then GCC could not recognize that as complex type, and will not use builtin calls to calculate multiplication and division. So

[Bug tree-optimization/56902] Fails to SLP with mismatched +/- and negatable constants

2013-11-14 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56902 --- Comment #3 from Cong Hou --- How do you generate the final operations in vectorized code? I just submitted a patch on this issue. The patch supports non-isomorphic operations with the restriction that all operations on even/odd elements still

[Bug tree-optimization/59006] [4.9 Regression] internal compiler error: in vect_transform_stmt, at tree-vect-stmts.c:5963

2013-11-19 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59006 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #5 from

[Bug tree-optimization/57512] Vectorizer: cannot handle accumulation loop of signed char type

2013-12-19 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57512 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #2 from

[Bug tree-optimization/60656] [4.8/4.9 regression] x86 vectorization produces wrong code

2014-03-25 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60656 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #2 from

[Bug tree-optimization/60656] [4.8/4.9 regression] x86 vectorization produces wrong code

2014-03-25 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60656 --- Comment #4 from Cong Hou --- Yes, there is a quick fix: we can check if the def with vect_used_by_reduction is immediately used by a reduction stmt. After all, it seems that supportable_widening_operation() is the only place that takes advanta

[Bug tree-optimization/60656] [4.8/4.9 regression] x86 vectorization produces wrong code

2014-03-28 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60656 --- Comment #7 from Cong Hou --- Yes, will do it. Thank you a lot!

[Bug testsuite/60773] [4.9 Regression] FAIL: gcc.dg/vect/pr60656.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1

2014-04-07 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60773 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #2 from

[Bug testsuite/60773] [4.9 Regression] FAIL: gcc.dg/vect/pr60656.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1

2014-04-09 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60773 --- Comment #5 from Cong Hou --- Hi Jakub Thank you very much for the commit! thanks, Cong On Wed, Apr 9, 2014 at 4:39 AM, jakub at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60773 > > Jakub Jelinek changed: > >

[Bug tree-optimization/60896] [4.10 Regression] ICE: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1449

2014-04-23 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60896 --- Comment #3 from Cong Hou --- Created attachment 32668 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32668&action=edit The patch to fix PR60896 The reason of this issue is that those statements in PATTERN_DEF_SEQ in pre-recognized widen-

[Bug c++/61507] New: GCC does not compile function with parameter pack.

2014-06-13 Thread congh at google dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com GCC fails to compile the following code: struct A { void foo(const int &); void foo(float); }; template void bar(void (A::*memfun)(Args...), Args... args); void go(const int& i)

[Bug target/58762] [missed optimization] Vectorizing abs(int).

2014-03-05 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58762 Cong Hou changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/60505] New: Warning caused by GCC vectorizer.

2014-03-11 Thread congh at google dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com The compilation on the code below fails with options "-Wall -Werror -O2 -ftree-loop-vectorize". The reason is that the epilogue generated by the vectorizer tries to access the memory outside

[Bug tree-optimization/60505] Warning caused by GCC vectorizer.

2014-03-11 Thread congh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60505 --- Comment #1 from Cong Hou --- Google ref: b/13403465

[Bug tree-optimization/64365] Predictive commoning after loop vectorization produces incorrect code.

2015-01-13 Thread congh at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64365 --- Comment #1 from Cong Hou --- Ping on this bug.

[Bug tree-optimization/64365] [4.9 Regression] Predictive commoning after loop vectorization produces incorrect code.

2015-01-15 Thread congh at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64365 --- Comment #9 from Cong Hou --- Thanks for the fix, Richard!

[Bug tree-optimization/63530] New: GCC generates incorrect aligned store on ARM after the loop is unrolled.

2014-10-13 Thread congh at google dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com Created attachment 33710 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33710&action=edit assembly When compile the code show

[Bug tree-optimization/63530] GCC generates incorrect aligned store on ARM after the loop is unrolled.

2014-10-15 Thread congh at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63530 --- Comment #2 from Cong Hou --- This issue can also be reproduced on x86_64. Compile the following code with options (assume the file name is t.c): -O2 -ftree-vectorize t.c -fdump-tree-all-alias #include typedef struct { unsigned char map[

[Bug tree-optimization/64365] New: Predictive commoning after loop vectorization produces incorrect code.

2014-12-19 Thread congh at google dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: congh at google dot com Compiling the following loop with -O3 on x86-64 produces incorrect code: void foo(int *in) { for (int i = 14; i >= 10; i--) { in[i