Yup, ephedrine, pseudoephedrine, ritalin, adderall, any speed like amphetamine substance WILL shrink your dick temporarily.
i seriously have not been able to get hard at all on drugs like this, and they can take a 4 inch flaccid penis, and shrink it to 2 inches, with the girth of ... my pinky finger, your balls will tighten up, and there's no sensitivity or pleasure in the penis at all, it shrinks worse than it would if you jumped in a cold swimming pool right after you had sex, which is why i don't mess with the shit - you will look like you have a baby's dick
weed has never affected my penis for better or for worse.
smoking anything including cigarettes or weed constricts blood vessels in your penis probably making it temporarily smaller by 1/8 inch at the most -- although it's probable that it can stunt your growth during adolescence.
a little coke, dick hard as rock, too much, SPS (shrunken penis syndrome)
on psychedelics, i've had lots of benefits and no problems, just heightened arousal and sensitivity probably making it 1/2 inch longer on limp, always gives me a perpetual "floaty".
My advice about the "hard" drugs is that you won't be "hard" if you take them. i've had this experience with heroin and speed-like stuff mostly, never with coke, cuz i never did do that much.