InstCombine: When comparing two GEPs that were derived from the same base pointer...
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 20 Feb 2012 15:07:47 +0000 (15:07 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 20 Feb 2012 15:07:47 +0000 (15:07 +0000)
commit9bb40853eeef1d11b626bdc58e00121e35187866
treec931d63cf2be794176c990be0d6fa7fbbb98956e
parentd2348639e639573a7708de9ea98dc55bade048a6
InstCombine: When comparing two GEPs that were derived from the same base pointer but use different types, expand the offset calculation and to the compare on the offset if profitable.

This came up in SmallVector code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150962 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/icmp.ll