]> granicus.if.org Git - llvm/commit
Merging r332302:
authorTom Stellard <tstellar@redhat.com>
Tue, 29 May 2018 23:16:15 +0000 (23:16 +0000)
committerTom Stellard <tstellar@redhat.com>
Tue, 29 May 2018 23:16:15 +0000 (23:16 +0000)
commit0bab0f283916d7a498233447b9658823bbf72189
treee66245a1ca677162ef8d131d6de9158ae9bda56f
parent0132c61db42947a59bcf9a90a3ed0fe7cf5b8c16
Merging r332302:

------------------------------------------------------------------------
r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines

[InstCombine] fix crash due to ignored addrspacecast

Summary:
Part of the InstCombine code for simplifying GEPs looks through
addrspacecasts. However, this was done by updating a variable
also used by the next transformation, for marking GEPs as
inbounds. This led to replacing a GEP with a similar instruction
in a different addrspace, which caused an assertion failure in RAUW.

This caused julia issue https://github.com/JuliaLang/julia/issues/27055

Patch by Jeff Bezanson <jeff@juliacomputing.com>

Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D46722
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333477 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/gep-addrspace.ll