Difference between AllocaInst::getType() vs AllocaInst::getAllocatedType()

From the documentation, I can’t understand the difference between AllocaInst::getType() vs AllocaInst::getAllocatedType() methods. Can anyone please enlighten me?

The AllocaInst instruction allocates stack memory. The value that it returns is always a pointer to memory. You should run an experiment to double-check this, but I believe AllocaInst::getType() returns the type of the value that is the result of the alloca while AllocaInst::getAllocatedType() returns the type of the value that is allocated. For example, if the alloca allocates a struct {int ; int}, then getAllocatedType() returns a struct type and getType() return a “pointer to struct” type. Regards, John Criswell