Please find attached the new version of this patch addressing all your comments.
ChangeLog are now as follows: *** gcc/ChangeLog *** 2014-05-04 Thomas Preud'homme <thomas.preudho...@arm.com> PR tree-optimization/54733 * expr.c (get_inner_reference): Add a parameter to control whether a MEM_REF should be split into base + offset. * tree.h (get_inner_reference): Default new parameter to false. * tree-ssa-math-opts.c (find_bswap_load): New. (find_bswap_1): Add support for memory source. (find_bswap): Likewise. (execute_optimize_bswap): Likewise. *** gcc/testsuite/ChangeLog *** 2014-05-04 Thomas Preud'homme <thomas.preudho...@arm.com> PR tree-optimization/54733 * gcc.dg/optimize-bswapdi-3.c: New test to check extension of bswap optimization to support memory sources. * gcc.dg/optimize-bswaphi-1.c: Likewise. * gcc.dg/optimize-bswapsi-2.c: Likewise. * gcc.c-torture/execute/bswap-2.c: Likewise. Ok for stage1? Note that I haven't commited part 1 despite your approval as I'm waiting for the other parts to be approved. I don't know if it's the usual procedure for patchset. Best regards, Thomas Preud'homme
gcc32rm-84.5.1.part2.diff
Description: Binary data