"I heard a man praying for forgiveness for his parents who were idolaters, and I said: 'Are you praying for forgiveness for them even though they are idolators?" He said: 'Didn't Ibrahim pray for forgiveness for his father?' I went to the Prophet and told him about that, then the following revealed: And Ibrahim's (Abraham) invoking (of Allah) for his father's forgiveness was only because of a promise he (Ibrahim) had made to him (his father)." (Daif) (Using translation from Nasāʾī 2036)
سَمِعْتُ عَلِيًّا يَقُولُ اسْتَغْفَرَ رَجُلٌ لِأَبَوَيْهِ وَهُمَا مُشْرِكَانِ فَقُلْتُ أَتَسْتَغْفِرُ لَهُمَا وَهُمَا مُشْرِكَانِ؟ فَقَالَ اسْتَغْفَرَ إِبْرَاهِيمُ لِأَبِيهِ فَذَكَرْتُ ذَلِكَ لِرَسُولِ اللَّهِ ﷺ فَأَنْزَلَ اللَّهُ {وَمَا كَانَ اسْتِغْفَارُ إِبْرَاهِيمَ لِأَبِيهِ إِلَّا عَنْ مَوْعِدَةَ وَعَدَهَا إِيَّاهُ} [التوبة 114] سكت عنه الذهبي في التلخيص