This Phase IIb, randomized, placebo-controlled, multicenter, international study will evaluate the efficacy, safety, and tolerability of sildenafil or placebo added to pirfenidone (Esbriet) treatment in participants with advanced IPF and intermediate or high probability of Group 3 pulmonary hypertension (PH) who are on a stable dose of pirfenidone with demonstrated tolerability. Participants will be randomized to receive 1 year of treatment with either oral sildenafil or matching placebo while continuing to take pirfenidone.