Tweak RULEs; fixes #7041
Tweak RULEs; fixes #7041

In particular, the gcd rule now uses smallInteger rather than S#, which
means that it actually fires.

Also fixed a bug when the result is minBound :: Int.

olsner/ghc,snoyberg/ghc,ryantm/ghc,sgillespie/ghc,fmthoma/ghc,mcschroeder/ghc,shlevy/ghc,mfine/ghc,ryantm/ghc,olsner/ghc,AlexanderPankiv/ghc,forked-upstream-packages-for-ghcjs/ghc,gridaphobe/ghc,christiaanb/ghc,mettekou/ghc,GaloisInc/halvm-ghc,green-haskell/ghc,siddhanathan/ghc,nushio3/ghc,mcschroeder/ghc,nkaretnikov/ghc,olsner/ghc,oldmanmike/ghc,green-haskell/ghc,TomMD/ghc,snoyberg/ghc,mfine/ghc,TomMD/ghc,ml9951/ghc,TomMD/ghc,mcschroeder/ghc,elieux/ghc,olsner/ghc,anton-dessiatov/ghc,gridaphobe/ghc,fmthoma/ghc,forked-upstream-packages-for-ghcjs/ghc,gcampax/ghc,forked-upstream-packages-for-ghcjs/ghc,mfine/ghc,mfine/ghc,tibbe/ghc,da-x/ghc,wxwxwwxxx/ghc,nkaretnikov/ghc,snoyberg/ghc,christiaanb/ghc,jstolarek/ghc,sdiehl/ghc,christiaanb/ghc,sgillespie/ghc,nushio3/ghc,TomMD/ghc,tibbe/ghc,bitemyapp/ghc,GaloisInc/halvm-ghc,ml9951/ghc,frantisekfarka/ghc-dsi,christiaanb/ghc,olsner/ghc,nushio3/ghc,sdiehl/ghc,holzensp/ghc,acowley/ghc,wxwxwwxxx/ghc,AlexanderPankiv/ghc,da-x/ghc,ezyang/ghc,siddhanathan/ghc,bitemyapp/ghc,elieux/ghc,bitemyapp/ghc,fmthoma/ghc,green-haskell/ghc,ghc-android/ghc,forked-upstream-packages-for-ghcjs/ghc,oldmanmike/ghc,forked-upstream-packages-for-ghcjs/ghc,siddhanathan/ghc,mcschroeder/ghc,wxwxwwxxx/ghc,da-x/ghc,da-x/ghc,tjakway/ghcjvm,ghc-android/ghc,tibbe/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,shlevy/ghc,oldmanmike/ghc,tjakway/ghcjvm,lukexi/ghc,ghc-android/ghc,oldmanmike/ghc,ghc-android/ghc,holzensp/ghc,tibbe/ghc,green-haskell/ghc,ml9951/ghc,anton-dessiatov/ghc,urbanslug/ghc,spacekitteh/smcghc,mettekou/ghc,vikraman/ghc,acowley/ghc,christiaanb/ghc,oldmanmike/ghc,nushio3/ghc,jstolarek/ghc,gridaphobe/ghc,sgillespie/ghc,snoyberg/ghc,jstolarek/ghc,gcampax/ghc,ghc-android/ghc,sgillespie/ghc,sgillespie/ghc,gcampax/ghc,acowley/ghc,mettekou/ghc,shlevy/ghc,AlexanderPankiv/ghc,sdiehl/ghc,acowley/ghc,wxwxwwxxx/ghc,gridaphobe/ghc,acowley/ghc,vikraman/ghc,holzensp/ghc,mfine/ghc,shlevy/ghc,ml9951/ghc,mettekou/ghc,shlevy/ghc,holzensp/ghc,tjakway/ghcjvm,fmthoma/ghc,spacekitteh/smcghc,urbanslug/ghc,gcampax/ghc,ezyang/ghc,tjakway/ghcjvm,ezyang/ghc,mcschroeder/ghc,urbanslug/ghc,vTurbine/ghc,AlexanderPankiv/ghc,wxwxwwxxx/ghc,gridaphobe/ghc,AlexanderPankiv/ghc,mfine/ghc,sdiehl/ghc,gcampax/ghc,jstolarek/ghc,vikraman/ghc,vikraman/ghc,nathyong/microghc-ghc,acowley/ghc,frantisekfarka/ghc-dsi,lukexi/ghc,sgillespie/ghc,nathyong/microghc-ghc,urbanslug/ghc,da-x/ghc,vikraman/ghc,GaloisInc/halvm-ghc,gridaphobe/ghc,ml9951/ghc,shlevy/ghc,vTurbine/ghc,AlexanderPankiv/ghc,tibbe/ghc,ryantm/ghc,wxwxwwxxx/ghc,ezyang/ghc,ryantm/ghc,nkaretnikov/ghc,tjakway/ghcjvm,mcschroeder/ghc,lukexi/ghc,nushio3/ghc,christiaanb/ghc,green-haskell/ghc,vTurbine/ghc,ghc-android/ghc,nathyong/microghc-ghc,forked-upstream-packages-for-ghcjs/ghc,siddhanathan/ghc,GaloisInc/halvm-ghc,vTurbine/ghc,tjakway/ghcjvm,mcschroeder/ghc,ezyang/ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,anton-dessiatov/ghc,mettekou/ghc,gcampax/ghc,elieux/ghc,ryantm/ghc,sdiehl/ghc,gcampax/ghc,siddhanathan/ghc,nkaretnikov/ghc,ezyang/ghc,tjakway/ghcjvm,da-x/ghc,anton-dessiatov/ghc,jstolarek/ghc,ml9951/ghc,frantisekfarka/ghc-dsi,bitemyapp/ghc,elieux/ghc,snoyberg/ghc,GaloisInc/halvm-ghc,nkaretnikov/ghc,da-x/ghc,spacekitteh/smcghc,urbanslug/ghc,ghc-android/ghc,oldmanmike/ghc,ezyang/ghc,nushio3/ghc,bitemyapp/ghc,spacekitteh/smcghc,vikraman/ghc,ml9951/ghc,frantisekfarka/ghc-dsi,christiaanb/ghc,mettekou/ghc,nkaretnikov/ghc,spacekitteh/smcghc,olsner/ghc,sdiehl/ghc,TomMD/ghc,siddhanathan/ghc,snoyberg/ghc,urbanslug/ghc,sdiehl/ghc,vikraman/ghc,lukexi/ghc,TomMD/ghc,anton-dessiatov/ghc,forked-upstream-packages-for-ghcjs/ghc,TomMD/ghc,elieux/ghc,GaloisInc/halvm-ghc,vTurbine/ghc,anton-dessiatov/ghc,ml9951/ghc,nathyong/microghc-ghc,mfine/ghc,vTurbine/ghc,lukexi/ghc,elieux/ghc,sgillespie/ghc,holzensp/ghc,shlevy/ghc,nushio3/ghc,nkaretnikov/ghc,urbanslug/ghc,vTurbine/ghc,acowley/ghc,gridaphobe/ghc,siddhanathan/ghc,nathyong/microghc-ghc,olsner/ghc,mettekou/ghc,fmthoma/ghc,frantisekfarka/ghc-dsi,AlexanderPankiv/ghc,elieux/ghc,fmthoma/ghc,snoyberg/ghc,nathyong/microghc-ghc,fmthoma/ghc,nathyong/microghc-ghc