Fix one bug in the latest incarnation of r209843 -- combining GEPs
authorChandler Carruth <chandlerc@gmail.com>
Thu, 29 May 2014 23:05:52 +0000 (23:05 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 29 May 2014 23:05:52 +0000 (23:05 +0000)
commite4b37ec73a7d9aecb5cbd131036188572921cc64
treedbcf101a6abb35f521dfa964f997ea7aa368654c
parent3fda4b2cd88ac2f140e745afb0f16bd07ea5143d
Fix one bug in the latest incarnation of r209843 -- combining GEPs
across PHI nodes. The code was computing the Idxs from the 'GEP'
variable's indices when what it wanted was Op1's indices. This caused an
ASan heap-overflow for me that pin pointed the issue when Op1 had more
indices than GEP did. =] I'll let Louis add a specific test case for
this if he wants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209857 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp