[Unroll] Follow-up for r247769: fix a bug in UnrolledInstAnalyzer::visitLoad.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 22 Sep 2015 21:41:29 +0000 (21:41 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 22 Sep 2015 21:41:29 +0000 (21:41 +0000)
commit831687d1576efd003b20c0574831bdf2ce317e60
treedb4f16a1581c1e9bc2f9bef7a02598a8ba8924a1
parent9800f4ca6e381fd475e54b1a9c7dade3b8742e98
[Unroll] Follow-up for r247769: fix a bug in UnrolledInstAnalyzer::visitLoad.

Apart from checking that GlobalVariable is a constant, we should check
that it's not a weak constant, in which case we can't propagate its
value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248327 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/full-unroll-heuristics-2.ll