These fix some regressions in a downstream project with 4.0 compared to 3.9, due to the InstCombine pass incorrectly introducing addrspacecast instructions when combining an alloca with a global variable.
Hi David, Are these OK to merge to the 4.0 branch: https://reviews.llvm.org/rL294786 https://reviews.llvm.org/rL296163
r294786 merged as r301452. r296163 merged as r303166.