Eliminate case-of-cast
Eliminate case-of-cast

Note [Case of cast]
~~~~~~~~~~~~~~~~~~~
Consider 	case (v `cast` co) of x { I# ->
		... (case (v `cast` co) of {...}) ...
We'd like to eliminate the inner case.  We can get this neatly by 
arranging that inside the outer case we add the unfolding
	v |-> x `cast` (sym co)
to v.  Then we should inline v at the inner case, cancel the casts, 
and away we go
	
This patch does the job, fixing a performance hole reported by Roman.


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