[ValueTracking] Fix crash in GetPointerBaseWithConstantOffset()

Authored by tstellarAMD on Sep 20 2016, 10:41 AM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.


[ValueTracking] Fix crash in GetPointerBaseWithConstantOffset()

While walking defs of pointer operands we were assuming that the pointer
size would remain constant. This is not true, because addresspacecast
instructions may cast the pointer to an address space with a different
pointer width.

Reviewers: sanjoy, reames

Subscribers: wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D24772