gnu/gcc/cc58cf0d2f9b255e29d9b7a409c5ab31542604d1 Use can_open_code_p in gimple-ssa-store-merging
...and extend can_open_code_p to handle bswap.
I'm not sure that the removed builtin_decl_explicit_p (BUILT_IN_BSWAP32)
calls are necessary, since the code would go on to use a BSWAP64
rather than a BSWAP32.
This fixes gcc.dg/optimize-bswapsi-6.c on RISC-V.
gcc/
* optabs-query.cc (can_open_code_p): Handle more bswap cases,
incorporating logic from...
* gimple-ssa-store-merging.cc (maybe_optimize_vector_constructor)
(pass_optimize_bswap::execute)
(imm_store_chain_info::try_coalesce_bswap): ...here. Use
can_open_code_p instead of direct optab_handler checks.
2 files changed