Fix a nasty continuation-duplication bug
Fix a nasty continuation-duplication bug

For a long-time mkDupableCont has had a bug that allows it to duplicate
an arbitrary continuation, which it should not do, of course.

The bug was that in the Select case of mkDupableCont we were calling
prepareCaseCont, which did not duplicate the continuation if there is
but a single alternative.  This is quite right in the case of the call
in rebuildCase, but quite wrong in mkDupableCont.

The bug manifest as follows. In the expression
	f (case ... of { ..several alts.. })
(when f is strict), we should transform to
	f (...transformed arg...)
The application of f should not be pushed down (see notes with the
ArgOf case of mkDupableCont.  But that was not happening in an example
like this (see how the call to f is pushed inwards).

f (a `div` abs (b::Int))
	--->
    case b_afT of wild_aHa { GHC.Base.I# x_aHc ->
    let {
      $j_sIe :: GHC.Prim.Int# -> GHC.Base.Int
      []
      $j_sIe =
	\ (ds1_aHr [Nothing OneShot] :: GHC.Prim.Int#) ->
	  Foo7.f
	    (case ds1_aHr of ds2_aHq {
	       __DEFAULT ->
		 case a_afS of wild1_aHM { GHC.Base.I# x_aHO ->
		 GHC.Base.I# (GHC.Base.divInt# x_aHO ds2_aHq)
		 };
	       0 -> GHC.Err.divZeroError @ GHC.Base.Int
	     })
    } in 
      case GHC.Prim.>=# x_aHc 0 of wild1_aHe [Dead Nothing] {
	GHC.Base.False ->
	  let {
	    ds1_aHr :: GHC.Prim.Int#
	    []
	    ds1_aHr = GHC.Prim.negateInt# x_aHc
	  } in  $j_sIe ds1_aHr;
	GHC.Base.True -> $j_sIe x_aHc
      }
    }



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