I recently came across a strange deoptimization (or rather missed optimization opportunity).
Consider this function for efficient unpacking of arrays of 3-bit intege
Pointer aliasing seems to be the problem, ironically between this and this->target. The compiler is taking into account the rather obscene possibility that you initialized:
this->target = &this
In that case, writing to this->target[0] would alter the contents of this (and thus, this->target).
The memory aliasing problem is not restricted to the above. In principle, any use of this->target[XX] given an (in)appropriate value of XX might point to this.
I am better versed in C, where this can be remedied by declaring pointer variables with the __restrict__ keyword.