stdlib: only build a sub-range if we need to type check
stdlib: only build a sub-range if we need to type check

Creating a range creates overflow checks, since we don't do anything with the
range in the case of value types these checks were truly superflous, and not
always cleaned up by llvm.

rdar://18777237

Swift SVN r23132

lorentey/swift,djwbrown/swift,jopamer/swift,gribozavr/swift,dduan/swift,alblue/swift,sschiau/swift,SwiftAndroid/swift,tinysun212/swift-windows,mightydeveloper/swift,MukeshKumarS/Swift,hooman/swift,calebd/swift,tkremenek/swift,Jnosh/swift,jmgc/swift,ben-ng/swift,swiftix/swift.old,tinysun212/swift-windows,Ivacker/swift,kusl/swift,MukeshKumarS/Swift,allevato/swift,zisko/swift,codestergit/swift,uasys/swift,CodaFi/swift,LeoShimonaka/swift,nathawes/swift,practicalswift/swift,natecook1000/swift,lorentey/swift,kperryua/swift,apple/swift,practicalswift/swift,atrick/swift,amraboelela/swift,Ivacker/swift,LeoShimonaka/swift,uasys/swift,frootloops/swift,SwiftAndroid/swift,danielmartin/swift,aschwaighofer/swift,alblue/swift,jopamer/swift,austinzheng/swift,rudkx/swift,roambotics/swift,glessard/swift,johnno1962d/swift,ken0nek/swift,kentya6/swift,nathawes/swift,KrishMunot/swift,dduan/swift,gribozavr/swift,austinzheng/swift,LeoShimonaka/swift,kstaring/swift,kusl/swift,xedin/swift,practicalswift/swift,kentya6/swift,felix91gr/swift,MukeshKumarS/Swift,OscarSwanros/swift,sdulal/swift,parkera/swift,atrick/swift,sschiau/swift,khizkhiz/swift,gregomni/swift,cbrentharris/swift,kstaring/swift,amraboelela/swift,hughbe/swift,SwiftAndroid/swift,danielmartin/swift,cbrentharris/swift,stephentyrone/swift,LeoShimonaka/swift,JaSpa/swift,jckarter/swift,deyton/swift,kusl/swift,glessard/swift,danielmartin/swift,harlanhaskins/swift,alblue/swift,mightydeveloper/swift,swiftix/swift,kentya6/swift,devincoughlin/swift,kperryua/swift,dduan/swift,harlanhaskins/swift,dreamsxin/swift,swiftix/swift,xwu/swift,atrick/swift,benlangmuir/swift,slavapestov/swift,kentya6/swift,arvedviehweger/swift,shahmishal/swift,ken0nek/swift,adrfer/swift,swiftix/swift.old,johnno1962d/swift,gmilos/swift,huonw/swift,harlanhaskins/swift,huonw/swift,jmgc/swift,tkremenek/swift,Ivacker/swift,codestergit/swift,deyton/swift,IngmarStein/swift,karwa/swift,airspeedswift/swift,brentdax/swift,devincoughlin/swift,milseman/swift,gmilos/swift,aschwaighofer/swift,felix91gr/swift,OscarSwanros/swift,slavapestov/swift,slavapestov/swift,tjw/swift,mightydeveloper/swift,gribozavr/swift,khizkhiz/swift,danielmartin/swift,jopamer/swift,shahmishal/swift,sschiau/swift,huonw/swift,MukeshKumarS/Swift,rudkx/swift,huonw/swift,tkremenek/swift,devincoughlin/swift,gribozavr/swift,IngmarStein/swift,russbishop/swift,JGiola/swift,roambotics/swift,return/swift,xwu/swift,nathawes/swift,swiftix/swift.old,emilstahl/swift,practicalswift/swift,dduan/swift,zisko/swift,codestergit/swift,shahmishal/swift,karwa/swift,stephentyrone/swift,airspeedswift/swift,hughbe/swift,emilstahl/swift,benlangmuir/swift,rudkx/swift,CodaFi/swift,JaSpa/swift,hooman/swift,therealbnut/swift,modocache/swift,Jnosh/swift,gribozavr/swift,return/swift,arvedviehweger/swift,hughbe/swift,brentdax/swift,MukeshKumarS/Swift,tinysun212/swift-windows,xedin/swift,shajrawi/swift,zisko/swift,JaSpa/swift,roambotics/swift,cbrentharris/swift,felix91gr/swift,austinzheng/swift,shahmishal/swift,OscarSwanros/swift,xwu/swift,return/swift,xedin/swift,emilstahl/swift,OscarSwanros/swift,therealbnut/swift,frootloops/swift,apple/swift,airspeedswift/swift,ahoppen/swift,LeoShimonaka/swift,sdulal/swift,deyton/swift,gregomni/swift,lorentey/swift,JGiola/swift,MukeshKumarS/Swift,karwa/swift,practicalswift/swift,return/swift,emilstahl/swift,bitjammer/swift,gregomni/swift,karwa/swift,cbrentharris/swift,hooman/swift,therealbnut/swift,kusl/swift,shahmishal/swift,johnno1962d/swift,uasys/swift,stephentyrone/swift,khizkhiz/swift,JaSpa/swift,swiftix/swift,frootloops/swift,apple/swift,cbrentharris/swift,tardieu/swift,gmilos/swift,Ivacker/swift,therealbnut/swift,kentya6/swift,danielmartin/swift,johnno1962d/swift,gribozavr/swift,karwa/swift,benlangmuir/swift,SwiftAndroid/swift,xedin/swift,russbishop/swift,karwa/swift,hooman/swift,codestergit/swift,khizkhiz/swift,therealbnut/swift,modocache/swift,aschwaighofer/swift,djwbrown/swift,xedin/swift,khizkhiz/swift,milseman/swift,SwiftAndroid/swift,Jnosh/swift,swiftix/swift.old,gottesmm/swift,deyton/swift,CodaFi/swift,johnno1962d/swift,glessard/swift,gmilos/swift,shajrawi/swift,ahoppen/swift,hughbe/swift,devincoughlin/swift,jtbandes/swift,OscarSwanros/swift,brentdax/swift,kusl/swift,sdulal/swift,amraboelela/swift,kstaring/swift,jmgc/swift,codestergit/swift,devincoughlin/swift,devincoughlin/swift,tinysun212/swift-windows,deyton/swift,huonw/swift,natecook1000/swift,kentya6/swift,huonw/swift,gottesmm/swift,mightydeveloper/swift,calebd/swift,emilstahl/swift,ben-ng/swift,SwiftAndroid/swift,kperryua/swift,stephentyrone/swift,tardieu/swift,kperryua/swift,shahmishal/swift,nathawes/swift,cbrentharris/swift,emilstahl/swift,jckarter/swift,djwbrown/swift,tjw/swift,modocache/swift,manavgabhawala/swift,brentdax/swift,xedin/swift,aschwaighofer/swift,stephentyrone/swift,sdulal/swift,sschiau/swift,modocache/swift,milseman/swift,KrishMunot/swift,adrfer/swift,airspeedswift/swift,frootloops/swift,sdulal/swift,lorentey/swift,calebd/swift,arvedviehweger/swift,allevato/swift,frootloops/swift,stephentyrone/swift,allevato/swift,KrishMunot/swift,gottesmm/swift,russbishop/swift,tardieu/swift,Jnosh/swift,modocache/swift,felix91gr/swift,sdulal/swift,djwbrown/swift,LeoShimonaka/swift,tkremenek/swift,austinzheng/swift,sdulal/swift,IngmarStein/swift,alblue/swift,alblue/swift,gottesmm/swift,mightydeveloper/swift,milseman/swift,harlanhaskins/swift,gmilos/swift,gottesmm/swift,apple/swift,MukeshKumarS/Swift,modocache/swift,practicalswift/swift,bitjammer/swift,ken0nek/swift,johnno1962d/swift,JaSpa/swift,ken0nek/swift,IngmarStein/swift,IngmarStein/swift,ben-ng/swift,hughbe/swift,kusl/swift,allevato/swift,IngmarStein/swift,JGiola/swift,russbishop/swift,frootloops/swift,parkera/swift,Jnosh/swift,jtbandes/swift,felix91gr/swift,jopamer/swift,glessard/swift,adrfer/swift,apple/swift,shajrawi/swift,parkera/swift,swiftix/swift.old,hooman/swift,milseman/swift,tinysun212/swift-windows,CodaFi/swift,kusl/swift,allevato/swift,rudkx/swift,tinysun212/swift-windows,manavgabhawala/swift,huonw/swift,manavgabhawala/swift,aschwaighofer/swift,tjw/swift,glessard/swift,sschiau/swift,Jnosh/swift,parkera/swift,nathawes/swift,gregomni/swift,JGiola/swift,stephentyrone/swift,uasys/swift,parkera/swift,swiftix/swift.old,djwbrown/swift,karwa/swift,jopamer/swift,djwbrown/swift,devincoughlin/swift,dduan/swift,adrfer/swift,jmgc/swift,gmilos/swift,zisko/swift,tjw/swift,mightydeveloper/swift,dreamsxin/swift,khizkhiz/swift,parkera/swift,felix91gr/swift,adrfer/swift,amraboelela/swift,rudkx/swift,kstaring/swift,danielmartin/swift,jopamer/swift,ahoppen/swift,ahoppen/swift,austinzheng/swift,slavapestov/swift,Ivacker/swift,harlanhaskins/swift,JaSpa/swift,glessard/swift,shajrawi/swift,aschwaighofer/swift,LeoShimonaka/swift,ben-ng/swift,kperryua/swift,jtbandes/swift,CodaFi/swift,johnno1962d/swift,nathawes/swift,tkremenek/swift,allevato/swift,hughbe/swift,codestergit/swift,JGiola/swift,emilstahl/swift,dduan/swift,deyton/swift,swiftix/swift.old,hughbe/swift,KrishMunot/swift,russbishop/swift,tjw/swift,parkera/swift,KrishMunot/swift,natecook1000/swift,Ivacker/swift,practicalswift/swift,tardieu/swift,sschiau/swift,CodaFi/swift,tardieu/swift,gmilos/swift,LeoShimonaka/swift,natecook1000/swift,ken0nek/swift,natecook1000/swift,shahmishal/swift,ken0nek/swift,Ivacker/swift,arvedviehweger/swift,alblue/swift,KrishMunot/swift,return/swift,practicalswift/swift,gribozavr/swift,jtbandes/swift,mightydeveloper/swift,natecook1000/swift,jckarter/swift,milseman/swift,gribozavr/swift,kstaring/swift,khizkhiz/swift,JaSpa/swift,ben-ng/swift,zisko/swift,swiftix/swift,kusl/swift,shahmishal/swift,calebd/swift,austinzheng/swift,Ivacker/swift,allevato/swift,calebd/swift,jckarter/swift,IngmarStein/swift,gottesmm/swift,brentdax/swift,russbishop/swift,bitjammer/swift,ahoppen/swift,parkera/swift,airspeedswift/swift,manavgabhawala/swift,airspeedswift/swift,russbishop/swift,benlangmuir/swift,ken0nek/swift,milseman/swift,gregomni/swift,deyton/swift,brentdax/swift,hooman/swift,kperryua/swift,cbrentharris/swift,calebd/swift,roambotics/swift,aschwaighofer/swift,xedin/swift,jmgc/swift,lorentey/swift,sschiau/swift,amraboelela/swift,OscarSwanros/swift,shajrawi/swift,xedin/swift,bitjammer/swift,atrick/swift,jmgc/swift,roambotics/swift,benlangmuir/swift,bitjammer/swift,jmgc/swift,roambotics/swift,kentya6/swift,adrfer/swift,harlanhaskins/swift,tardieu/swift,tjw/swift,mightydeveloper/swift,uasys/swift,xwu/swift,shajrawi/swift,modocache/swift,uasys/swift,kstaring/swift,therealbnut/swift,gregomni/swift,kstaring/swift,harlanhaskins/swift,amraboelela/swift,apple/swift,djwbrown/swift,gottesmm/swift,manavgabhawala/swift,zisko/swift,karwa/swift,lorentey/swift,xwu/swift,swiftix/swift,Jnosh/swift,swiftix/swift,manavgabhawala/swift,SwiftAndroid/swift,bitjammer/swift,return/swift,uasys/swift,shajrawi/swift,zisko/swift,tinysun212/swift-windows,jtbandes/swift,arvedviehweger/swift,ahoppen/swift,danielmartin/swift,brentdax/swift,jopamer/swift,arvedviehweger/swift,tardieu/swift,amraboelela/swift,adrfer/swift,tkremenek/swift,tkremenek/swift,tjw/swift,OscarSwanros/swift,slavapestov/swift,lorentey/swift,alblue/swift,xwu/swift,shajrawi/swift,atrick/swift,sschiau/swift,dduan/swift,atrick/swift,xwu/swift,KrishMunot/swift,sdulal/swift,bitjammer/swift,kperryua/swift,felix91gr/swift,devincoughlin/swift,natecook1000/swift,frootloops/swift,austinzheng/swift,calebd/swift,ben-ng/swift,rudkx/swift,arvedviehweger/swift,ben-ng/swift,jtbandes/swift,benlangmuir/swift,jckarter/swift,therealbnut/swift,hooman/swift,jtbandes/swift,JGiola/swift,airspeedswift/swift,swiftix/swift.old,jckarter/swift,cbrentharris/swift,CodaFi/swift,return/swift,lorentey/swift,swiftix/swift,codestergit/swift,manavgabhawala/swift,slavapestov/swift,nathawes/swift,slavapestov/swift,kentya6/swift,jckarter/swift,emilstahl/swift