@gumnosTim Chase something about it falling out of induction variable analysis if I remember right when I asked the devs. Sorry I wasn't clearer!
@mattgodbolt
@gumnosTim Chase I wrote a blog post some years ago explaining how this kind of optimization works:
https://kristerw.blogspot.com/2019/04/how-llvm-optimizes-geometric-sums.html
If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.gamedev.place/users/kristerw/statuses/115775039703374051 on your instance and quote it. (Note that quoting is not supported in Mastodon.)