[PATCH] tree-optimization/103345: Improved load merging
Mon Nov 22 08:39:42 GMT 2021
This patch implements PR tree-optimization/103345 to merge adjacent
loads when combined with addition or bitwise xor. The current code
in gimple-ssa-store-merging.c's find_bswap_or_nop alreay handles ior,
so that all that's required is to treat PLUS_EXPR and BIT_XOR_EXPR in
the same way at BIT_IOR_EXPR. Many thanks to Andrew Pinski for
pointing out that this also resolves PR target/98953.
This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
and make -k check with no new failures. The new testcases should also
pass (but haven't been tested) on other endian targets.
Ok for mainline?
2021-11-22 Roger Sayle <firstname.lastname@example.org>
* gimple-ssa-store-merging.c (find_bswap_or_nop_1): Handle
BIT_XOR_EXPR and PLUS_EXPR the same as BIT_IOR_EXPR.
* gcc.dg/tree-ssa/pr98953.c: New test case.
* gcc.dg/tree-ssa/pr103345.c: New test case.
Thanks in advance,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Gcc-patches