It appears to be an issue with Ryzen's new micro-op cache and "CMP/TEST conditional jump" instruction fusion.
See comment from inuwashidesu in this thread: https://www.reddit.com/r/programming/comments/6f08mb/compili...
See comment from inuwashidesu in this thread: https://www.reddit.com/r/programming/comments/6f08mb/compili...
Couldn't find the comment with that link for some reason - thanks for mentioning the username, had to get it from their account page :)