[Bug rtl-optimization/56175] Issue with combine phase on x86.

2013-02-04 Thread ysrumyan at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56175



--- Comment #3 from Yuri Rumyantsev ysrumyan at gmail dot com 2013-02-04 
08:55:12 UTC ---

Created attachment 29345

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29345

real test-case



Need to be compiled with proposed options.


[Bug rtl-optimization/56175] Issue with combine phase on x86.

2013-02-02 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56175



--- Comment #2 from Uros Bizjak ubizjak at gmail dot com 2013-02-02 12:01:56 
UTC ---

(In reply to comment #1)

 Created attachment 29330 [details]

 testcase

 

 This test must be compiled with the following options:

 -O2 -ffast-math -msse2 -mfpmath=sse -m32 -march=atom -mtune=atom

 -ftree-loop-if-convert



Compiling attached test with above flags, I got:



foo:

movl4(%esp), %eax

movl8(%esp), %edx

testb   %al, %al

je  .L3

testw   %dx, %dx

je  .L3

shrb%al

shrw%dx

xorl%edx, %eax

andl$1, %eax

ret

.L3:

xorl%eax, %eax

ret



which looks the same as your optimal assembly in Description - maybe due to the

fact that the attached test source is the same as the source in Description.



BTW: This is probably the case of missing CSE in tree optimizers. Combine pass

is not powerful enough to figure out optimal sequence, it more-or-less blindly

combines various patterns.



Please provide the test that exposes this missing optimization.


[Bug rtl-optimization/56175] Issue with combine phase on x86.

2013-02-01 Thread ysrumyan at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56175



--- Comment #1 from Yuri Rumyantsev ysrumyan at gmail dot com 2013-02-01 
15:58:49 UTC ---

Created attachment 29330

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29330

testcase



This test must be compiled with the following options:

-O2 -ffast-math -msse2 -mfpmath=sse -m32 -march=atom -mtune=atom

-ftree-loop-if-convert