Sayyiduna Ali and Sayyiduna Ibn Mas'ud (may Allah be pleased with them both) said: "If he accuses his wife (of adultery) after having divorced her while he still has the right to take her back, he shall perform li'an with her. And if he accuses her after having divorced her irrevocably, he shall not perform li'an with her."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9625