Iga Swiatek faced Beatriz Haddad Maia for a place in the semi-finals of the Mutua Madrid Open women's singles.