Currently, getMallocType checks the bitcast uses of the malloc call. If there is no bitcast uses of the malloc call, malloc function’s return type is returned. Sometimes, the bitcast is on the stored-to pointer instead of on the malloc call. This patch is to also consider the cases like this:
%call = call i8* @malloc store i8* %call, i8** bitcast (%T** @g to i8**)
Update here as well?