[Bug tree-optimization/56309] -O3 optimizer generates conditional moves instead of compare and branch resulting in almost 2x slower code

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Feb 14 17:34:00 GMT 2013


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

--- Comment #15 from Uros Bizjak <ubizjak at gmail dot com> 2013-02-14 17:34:15 UTC ---
(In reply to comment #13)
> $ g++ --version
> g++ (GCC) 4.7.2 ...
> $ g++ -O3 -std=c++11 by-val-O3.ii ; ./a.out
> Took 14.31 seconds total.
> $ g++ -O3 -std=c++11 by-val-O3.ii -fvect-cost-model ; ./a.out
> Took 14.31 seconds total.
> $ g++ -O3 -std=c++11 by-val-O3.ii -fno-tree-vectorize ; ./a.out
> Took 10.25 seconds total.

This is red herring, see PR53346c11:

--q--
You are right. -ftree-vectorize implies -ftree-loop-if-convert and this option
makes all the difference!
--/q--

Please try wiht -ftree-vectorize -fno-tree-loop-if-convert.



More information about the Gcc-bugs mailing list