https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96239
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:a7553ad60bebc419d510564b8b9f9e5e03725ff5 commit r11-6470-ga7553ad60bebc419d510564b8b9f9e5e03725ff5 Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Jan 5 16:16:06 2021 +0100 store-merging: Handle vector CONSTRUCTORs using bswap [PR96239] I've tried to add such helper, but handling over just analysis and letting each pass handle it differently seems complicated given the limitations of the bswap infrastructure. So, this patch just hooks the optimization also into store-merging so that the original testcase from the PR can be fixed. 2021-01-05 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/96239 * gimple-ssa-store-merging.c (maybe_optimize_vector_constructor): New function. (get_status_for_store_merging): Don't return BB_INVALID for blocks with potential bswap optimizable CONSTRUCTORs. (pass_store_merging::execute): Optimize vector CONSTRUCTORs with bswap if possible. * gcc.dg/tree-ssa/pr96239.c: New test.