Remove handling of AddrSpaceCast in stripAndAccumulateInBoundsConstantOffsets
authorPhilip Reames <listmail@philipreames.com>
Wed, 23 Sep 2015 19:48:43 +0000 (19:48 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 23 Sep 2015 19:48:43 +0000 (19:48 +0000)
commitf29442de6b0e50b32c98a1f457be3db98afca473
tree515329134ff271bef619954628ce7b9b978cd91a
parentff25c07a59d6b98f87532e0d9e218f8247cdfd75
Remove handling of AddrSpaceCast in stripAndAccumulateInBoundsConstantOffsets

Patch by: simoncook

Unlike BitCasts, AddrSpaceCasts do not always produce an output the same size as its input, which was previously assumed. This fixes cases where two address spaces do not have the same size pointer, as an assertion failure would occur when trying to prove deferenceability.  LoopUnswitch is used in the particular test, but LICM also exhibits the same problem.

Differential Revision: http://reviews.llvm.org/D13008

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248422 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Value.cpp
test/Transforms/LoopUnswitch/2015-09-18-Addrspace.ll [new file with mode: 0644]