[SCEV] identical instructions don't compute equal values
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 27 Sep 2015 21:09:48 +0000 (21:09 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 27 Sep 2015 21:09:48 +0000 (21:09 +0000)
commitd8387ead1eab56e32b0a89c3dfe72d489eec4f34
treef13b65229c90018bbed9841bdee7dafb264d2d73
parentfa2392de5f49336bcc93bc2f45f7ab3c3b5b54f0
[SCEV] identical instructions don't compute equal values

Before this change `HasSameValue` would return true for distinct
`alloca` instructions if they happened to be allocating the same
type (`alloca` instructions are not specified as reading memory).  This
change adds an explicit whitelist of instruction types for which
"identical" instructions compute the same value.

Fixes PR24952.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248690 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Transforms/IndVarSimplify/pr24952.ll [new file with mode: 0644]