[PATCH] D28300: [InstCombine] Fix address space handling when removing allocas

James Price via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 16:24:06 PST 2017


jprice added a comment.

In https://reviews.llvm.org/D28300#656855, @hfinkel wrote:

> Is this optimization safe in general if the address spaces don't match? Could, for example, some of the users being affected be some target-specific intrinsic that is only valid for certain address spaces?


This optimisation will always preserve the original address space of parameters passed to any `call` instructions, so I don't //think// this is an issue. I did just notice that this wasn't handled correctly by this patch in certain cases, so I've made sure that this is now the case (and added an appropriate test).


https://reviews.llvm.org/D28300





More information about the llvm-commits mailing list