https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66768
--- Comment #2 from Armin Rigo ---
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, rest
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66768
--- Comment #1 from Armin Rigo ---
Update: found out that the %gs prefix is correctly present when I compile with
"gcc -O1 -fno-ivopts bug1.c -S". So ivopts might be the place to look.