GEP and BitCast instructions may produce a pointer of vectors from
underlying object. So it is valid for GetUnderlyingObject utility to
accept vector of pointers and detect underlying object which might be
instruction of vector or non-vector type.
Thank you for your comment. Unfortunately till now I failed to create a test showing the benefit from this change in a pass (I tried). I can make one more try.
The problem I'm trying to solve is the following: in downstream pass I have a BitCast instruction which is actually originated from allocation but has a vector type gotten using gep + bitcast from allocation.
I'd like to know the fact that it is an underlying allocation but now utility function just ignore instructions with vector of pointers.