Merging r278413:
authorHans Wennborg <hans@hanshq.net>
Thu, 11 Aug 2016 21:43:23 +0000 (21:43 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 11 Aug 2016 21:43:23 +0000 (21:43 +0000)
commit1409d14487c2286ff06d4b3dbf5966574ca15c70
tree47dc874dd304d0811c1dd1e7b738233d8d053d81
parent23fab3af819489deabcc6c583369531101237a66
Merging r278413:
------------------------------------------------------------------------
r278413 | gberry | 2016-08-11 14:05:17 -0700 (Thu, 11 Aug 2016) | 17 lines

[SCEV] Update interface to handle SCEVExpander insert point motion.

Summary:
This is an extension of the fix in r271424.  That fix dealt with builder
insert points being moved by SCEV expansion, but only for the lifetime
of the expand call.  This change modifies the interface so that LSR can
safely call expand multiple times at the same insert point and do the
right thing if one of the expansions decides to move the original insert
point.

This is a fix for PR28719.

Reviewers: sanjoy

Subscribers: llvm-commits, mcrosier, mzolotukhin

Differential Revision: https://reviews.llvm.org/D23342
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@278424 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolutionExpander.h
lib/Analysis/ScalarEvolutionExpander.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/X86/pr28719.ll [new file with mode: 0644]