https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78085
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> --- It looks like this issue has been fixed in GCC13 trunk,cltq is gone for the first and the last function, but i don't know which exact commit fixed it.