Further-reduced example function and IR (identical between 3.3 and 3.6):
julia> elty = Complex{Float64}; x = ones(elty,10); p = -1
julia> function gv(p)
av = float(abs(1.0+0.0im))
T = Float64
pp::promote_type(Float64, T) = p
sum::Float64 = av^pp
end