HomePhabricator

[ValueTracking] Fix crash in GetPointerBaseWithConstantOffset()

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

Description

[ValueTracking] Fix crash in GetPointerBaseWithConstantOffset()

Summary:
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