https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84402
--- Comment #62 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Looking at gimple-match.cc, the case CFN_BUILT_IN_ATOMIC_FETCH_OR_{1,2,4,8,16}: etc. blocks are identical there, except for the numbers in next_after_fail* label numbers. So, could we perhaps expand everything the way we do and just when emitting a switch hash the subtree of the cases to be emitted and if the hashes are equal also compare and if the subtrees are the same (== would result in the same text being emitted into the output except for the label numbers) emit multiple cases with the same block? Admittedly I haven't looked yet at the data structures genmatch.cc uses before emitting the source, so don't know whether it is feasible.