Sildenafil is a prescription drug that is used to treat erectile dysfunction and pulmonary arterial hypertension. The drug is also used to treat pulmonary arterial hypertension in men with diabetes mellitus.