Two-time Madrid Open champion Simona Halep continued her fine form in the quarter-finals of the Madrid Open, beating Australian Ashleigh Barty 7-5, 7-5.