https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114516
--- Comment #1 from Robin Dapp <rdapp at gcc dot gnu.org> --- The issue is that we're not considering pattern statements for costing. It's rather straightforward to include those as well which would fix this PR. I'm going to test a patch locally.