https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66768
--- Comment #2 from Armin Rigo <arigo at tunes dot org> --- Actually "gcc -O1 -fno-tree-loop-optimize bug1.c -S" also restores the %gs prefix. I suspect however that this flag implies "-fno-ivopts", or something. I found no other "-fno-xxx" that, when given alone, restores the %gs, no I think that either ivopts or tree-loop-optimize is definitely the correct place to look.