OSDN Git Service

Create a getelementptr instead of sub expr for ValueOffsetPair if the
authorWei Mi <wmi@google.com>
Wed, 14 Sep 2016 04:39:50 +0000 (04:39 +0000)
committerWei Mi <wmi@google.com>
Wed, 14 Sep 2016 04:39:50 +0000 (04:39 +0000)
commit81a2b8958e16635703f58fd35fa60b826660236b
tree35807f7fc771b049569fc42816ae4b3ea1be44f5
parente6c628ff625c26749c09b1e1bab3002bbbc19d53
Create a getelementptr instead of sub expr for ValueOffsetPair if the
value is a pointer.

This patch is to fix PR30213. When expanding an expr based on ValueOffsetPair,
if the value is of pointer type, we can only create a getelementptr instead
of sub expr.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281439 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolutionExpander.cpp
test/Analysis/ScalarEvolution/scev-expander-reuse-gep.ll [new file with mode: 0644]