Make ConvertableToGEP handle cases where the user is indexing into the
authorChris Lattner <sabre@nondot.org>
Thu, 21 Mar 2002 06:27:20 +0000 (06:27 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 21 Mar 2002 06:27:20 +0000 (06:27 +0000)
commit9e77f7e08b4241b810a3cccafb3d56dc256e0d1b
tree550c6ad6045d8da34d440a703feab2915f27fd03
parent8e86542fb698258a7feaa5703a1cf3918a7198fb
Make ConvertableToGEP handle cases where the user is indexing into the
first element of a structure type.  Before this would not be handled because
getStructOffset would either stop immediately (because StopEarly was true
and Offset = 0), or blast past the level we wanted.

Now ConvertableToGEP steps down through the type one level at a time, checking
the Offset and Scale conditions at each step

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