Sorry, I was wrong – srem is translated to idiv on amd64, which does not allow the combination of typemin and -1.
srem
idiv
typemin
-1