Fix a bug compiling PR1978 (perhaps not the only one though) which
authorChris Lattner <sabre@nondot.org>
Tue, 5 Feb 2008 04:45:32 +0000 (04:45 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 5 Feb 2008 04:45:32 +0000 (04:45 +0000)
commit7c95debb496624ee43c2f25cc4d7299f4c589bb2
tree78e1d73fba420395b340acec3c26b0871e03c625
parenta8701a6c62158b2b84cc24ed2149e4107d03409a
Fix a bug compiling PR1978 (perhaps not the only one though) which
was incorrectly simplifying "x == (gep x, 1, i)" into false, even
though i could be negative.  As it turns out, all the code to
handle this already existed, we just need to disable the incorrect
optimization case and let the general case handle it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46739 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/2008-02-04-GEPIdxBug.ll [new file with mode: 0644]