[PATCH] D33361: [InstCombine] Fix inbounds gep for addrspacecasts

Sven van Haastregt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 01:57:00 PDT 2017


svenvh added a subscriber: arsenm.
svenvh added a comment.

It seems commit r215467 ("Allwo bitcast + struct GEP transform to work with addrspacecast", 2014-08-12) already assumes it can swap GEPs and addrspacecasts indeed.  Adding @arsenm; perhaps we should reconsider that commit?

In the meantime, I can update this patch to simply not infer inbounds when address spaces don't match, so that at least we no longer assert on the test case.  Would that make sense?


https://reviews.llvm.org/D33361





More information about the llvm-commits mailing list