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

2015-10-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56902

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||6.0
 Resolution|--- |FIXED

--- Comment #4 from Richard Biener  ---
This is now fixed.  Note + 3. vs. - 3. should be handled more optimally
(PR68050)


[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
be isomorphic. Please give me the comment on this patch.

Thank you!


Cong


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

2013-11-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56902

--- Comment #2 from Richard Biener  ---
Created attachment 31209
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31209&action=edit
hack

Btw, I also had a patch^Whack, see attached.  Also further patches that didn't
get merged to take care of vectorizing PR37021 better.


[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 Cong Hou  ---
I just made a patch which supports limited non-isomorphic operations
(operations on even/odd elements are still isomorphic) for SLP. Then the three
loops you listed can be vectorized using SLP by using new VEC_ADDSUB_EXPR or
VEC_SUBADD_EXPR. For x86, SSE3 provides ADDSUBPD/ADDSUBPS instructions which
can do the job, but I also emulated them for SSE (use mask to negate the
even/odd elements and then add).

I think we will need to support more general non-isomorphic operations, which
is more difficult and challenging. But I think the limited support in this
patch is also useful at this time.

I will send the patch later.