IR: Fold away compares between GV GEPs and GVs
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 4 Jul 2014 22:05:26 +0000 (22:05 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 4 Jul 2014 22:05:26 +0000 (22:05 +0000)
commit76735fbd2e4e145e11a2fa8eebed4039556d5a43
tree9a116f157c538130dcf099f0c36e7154af74c9b3
parent483d89bcd454011f1ceb3aab7424463ea85a4f23
IR: Fold away compares between GV GEPs and GVs

A GEP of a non-weak global variable will not be equivalent to another
non-weak global variable or a GEP of such a variable.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212360 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/ConstantFold.cpp
test/Other/constant-fold-gep.ll
test/Transforms/InstCombine/2010-03-03-ExtElim.ll
test/Transforms/InstCombine/pr20079.ll
test/Transforms/LoopVectorize/if-conversion.ll