[ValueTracking] Move GlobalAlias handling to be after the max depth check in computeK...
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 23 Dec 2014 11:33:41 +0000 (11:33 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 23 Dec 2014 11:33:41 +0000 (11:33 +0000)
commita098c770e1f96f6f728cc220ae6f4f5297d0603d
tree054e65c8e98db0195fb2c917954237b9c3a15e96
parent1a637e9fc0f74485f036f5af6e3470e6557dcf0b
[ValueTracking] Move GlobalAlias handling to be after the max depth check in computeKnownBits()

GlobalAlias handling used to be after GlobalValue handling, which meant it was, in practice, dead code. r220165 moved GlobalAlias handling to be before GlobalValue handling, but also moved it to be before the max depth check, causing an assert due to a recursion depth limit violation.

This moves GlobalAlias handling forward to where it's safe, and changes the GlobalValue handling to only look at GlobalObjects.

Differential Revision: http://reviews.llvm.org/D6758

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224765 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstCombine/alias-recursion.ll [new file with mode: 0644]