OSDN Git Service

Truncate GEP indexes larger than the pointer size down to pointer size
authorChris Lattner <sabre@nondot.org>
Mon, 4 Jan 2010 18:57:15 +0000 (18:57 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 4 Jan 2010 18:57:15 +0000 (18:57 +0000)
commitd7f5a588907f86ddc83fa29accea54a6c0e78e94
tree58ad48ef96dc55d4dcfa667f438abb2b6b872810
parent0cb1e9edd5ae9862da46d102daf613cd688eb61a
Truncate GEP indexes larger than the pointer size down to pointer size
when doing this transform if the GEP is not inbounds.  No testcase because
it is very difficult to trigger this: instcombine already canonicalizes
GEP indices to pointer size, so it relies specific permutations of the
instcombine worklist.

Thanks to Duncan for pointing this possible problem out.

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