Hi H.J. Bug with reproducer was submitted:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64434 2014-12-29 16:53 GMT+03:00 H.J. Lu <hjl.to...@gmail.com>: > On Mon, Dec 29, 2014 at 5:30 AM, Yuri Rumyantsev <ysrum...@gmail.com> wrote: >> Hi All, >> >> Here is a patch which fixed several performance degradation after >> operand canonicalization (r216728). Very simple approach is used - if >> operation is commutative and its second operand required more >> operations (statements) for computation, swap operands. >> Currently this is done under special option which is set-up to true >> only for x86 32-bit targets ( we have not seen any performance >> improvements on 64-bit). > > Can you open a regression bug? Do you know how it improves > performance in 32-bit? > >> Is it OK for trunk? >> >> 2014-12-26 Yuri Rumyantsev <ysrum...@gmail.com> >> >> * cfgexpand.c (count_num_stmt): New function. >> (reorder_operands): Likewise. >> (expand_gimple_basic_block): Insert call of reorder_operands. >> * common.opt(flag_reorder_operands): Add new flag. >> * config/i386/i386.c (ix86_option_override_internal): Add setup of >> flag_reorder_operands for 32-bit target only. >> * (doc/invoke.texi: Add new optimization option -freorder-operands. >> >> gcc/testsuite/ChangeLog >> * gcc.target/i386/swap_opnd.c: New test. > > > > -- > H.J.