[Unroll] Fix a bug in UnrolledInstAnalyzer::visitLoad.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Wed, 16 Sep 2015 03:25:09 +0000 (03:25 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Wed, 16 Sep 2015 03:25:09 +0000 (03:25 +0000)
commit41591e7e3004e7ad02a3fdf237866b871288442b
tree7b12db322f303065a3b195c34bd98f78cf5798bc
parentf585a206467cbe5325ea71925096d00199cf935a
[Unroll] Fix a bug in UnrolledInstAnalyzer::visitLoad.

We only checked that a global is initialized with constants, which is
incorrect. We should be checking that GlobalVariable *is* a constant,
not just initialized with it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247769 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/full-unroll-heuristics-2.ll [new file with mode: 0644]