https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82735
--- Comment #15 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Hongtao.liu from comment #14) > (In reply to Hongtao.liu from comment #12) > > (In reply to Jakub Jelinek from comment #10) > > > Last touched in PR99563. > > > I guess for the explicit user vzeroupper we need to add the clobbers/sets > > > earlier than in the vzeroupper pass, but ideally in a way that doesn't > > > force > > > save/restore of registers that aren't really needed in the function. > > > > Yes, if we want to add the clobbers/sets earlier(than CSE1), vzeroupper pass > > should be able to remove those unnecessary clobbers/sets. > > Correct typo, add the clobbers/sets earlier(than RA) I'm trying to add a post_reload splitter to add CLOBBERS of xmm to vzeroupper so that LRA knows vzeroupper will kill those xmm registers, then in pass_vzeroupper, transform those CLOBBERS to SET (xmm, xmm), it will benifit post_reload CSE which allow lower 128bits to cross vzeroupper, then in post_reload split2, drop those SETs, it's safe since there's no CSE between split2 and split3, problem is there's no update for data flow info between split2 and pro_and_epilog which mean even i manually drop those SETS, xmm6-xmm15 are still marked as used which causes redudant save and restore under 64-bit MSabi. I'm thinking of adding a target_hook for updating df info just in the begenning of pass_pro_and_epilogue, the default behavior of the target_hook is doing nothing , and in i386 backend, df_analyse is called only under TARGET_AVX && cfun->machine->has_explicit_vzeroupper.