For me it helped with both, here's why I say that, My libido was rock bottom, could I get a hard on, absolutely but when you really don't give a shit it does affect your function, maybe not in the way that most think of ED, It's like this......if you're not turned on, why would it stay hard?
Within a week of starting trt my wife had a terrified look on her face in the mornings because she didn't know what the hell was going on,

now she's a huge advocate of TRT.
I started using low dose cialis very recently for the N.O. effects, now instead of staying hard for an hour with no problem I swear it's nearly an "on demand" 24/7 kinda deal.
The only time in the last year that I even remotely experienced ANY drop in libido was when I ran Deca, took low doses of cabor and took care of it right away.