I think that this may have to do with literal powers being specialised on using the literal_pow function?
And the fact that the code generated by Base.power_by_squaring is quite complicated for higher powers, as you can see in your last code segment, so presumably LLVM is not able to simplify it.