https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113233
--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> --- > Confirm. But option save/restore has been always implemented: > > .section .gnu.lto_.opts,"",@progbits > .ascii "'-fno-openmp' '-fno-openacc' '-fno-pie' '-fcf-protection" > .ascii "=none' '-mabi=lp64d' '-march=loongarch64' '-mfpu=64' '-m" > .ascii "simd=lasx' '-mcmodel=normal' '-mtune=loongarch64' '-flto" > .ascii "'\000" > > So -msimd=lasx is correctly recorded. Not sure why it does not work. With LTO we need to mix code compiled with different sets of options. For this reason we imply for every function defition and optimization and target attribute which record the flags. So it seems target attribute is likely broken for this flag.