In a career that spanned more than four decades , Barretto played with such jazz greats as Dizzy Gillespie and Tito Puente .