The pop star performed the song on the second anniversary of Liam Payne's death.