https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94403
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|other |tree-optimization Last reconfirmed| |2020-03-30 Ever confirmed|0 |1 CC| |jakub at gcc dot gnu.org Resolution|DUPLICATE |--- Status|RESOLVED |REOPENED --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I don't see how it is similar except that it is about bswap detection. Your comment is weird, because bswap is detected for int32_t and not for int64_t, while the comment suggests otherwise. And the reason this is optimized for int32_t only is that the loop is completely unrolled in that case, but not for int64_t, where cunrolli punts on it even with -O2 -funroll-loops or -O3. And, the std::byte issue is unrelated to that. --- gcc/gimple-ssa-store-merging.c.jj 2020-03-20 09:33:03.602112329 +0100 +++ gcc/gimple-ssa-store-merging.c 2020-03-30 18:30:31.723341519 +0200 @@ -315,7 +315,8 @@ verify_symbolic_number_p (struct symboli lhs_type = gimple_expr_type (stmt); - if (TREE_CODE (lhs_type) != INTEGER_TYPE) + if (TREE_CODE (lhs_type) != INTEGER_TYPE + && TREE_CODE (lhs_type) != ENUMERAL_TYPE) return false; if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type)) can fix that one.