Communal divide on linguistic lines came during the British rule kid, before that Hindustani was the language for north Indian hindus as well as muslims, it was then that a conspicuous Urdu-Hindi divide appeared when Urdu was started to be written in nastaliq script and Hindi in devenagri. Urdu became the persianized version of hindustani while Hindi became its Sanskritized version.
That is general understanding but on study that is not totally true. Persian mixed with Devanagri was already there in form of Urdu. There was actually no divide but it was mainly 2 segregation because of script writing and usage of words in Devanagari or Persian by the percentages. From 1900-1950, Delhi, Punjab area used to learn everything in Nastaliq script so religious divide was not there as such. It was only happened after Pakistan chose it as National language.
Baba Bulleh Shah [ Hazrat Sayyid Abdullah Shah Qadiri RA ) studied Islam in two languages: Persian and Urdu. His teacher was a Hanafi Sunni jurist Hazrat Inyatullah Qadiri RA.
Dear, you can kill any man with your (ill) logic. Baba Bulleh Shah had Persian lineage and he had written in Punjabi. He never wrote in URDU. See this and identify Urdu:
Na maen momin vich maseet aan
Na maen vich kufar diyan reet aan
Na maen paakaan vich paleet aan
Na maen moosa na pharaun.
Bulleh! ki jaana maen kaun
Na maen andar ved kitaab aan,
Na vich bhangaan na sharaab aan
Na vich rindaan masat kharaab aan
Na vich jaagan na vich saun.
Bulleh! ki jaana maen kaun.
Na vich shaadi na ghamnaaki
Na maen vich paleeti paaki
Na maen aabi na maen khaki
Na maen aatish na maen paun
Bulleh!, ki jaana maen kaun
Na maen arabi na lahori
Na maen hindi shehar nagauri
Na hindu na turak peshawri
Na maen rehnda vich nadaun
Bulla, ki jaana maen kaun
Na maen bheth mazhab da paaya
Ne maen aadam havva jaaya
Na maen apna naam dharaaya
Na vich baitthan na vich bhaun
Bulleh , ki jaana maen kaun
Avval aakhir aap nu jaana
Na koi dooja hor pehchaana
Maethon hor na koi siyaana
Bulla! ooh khadda hai kaun
Bulla, ki jaana maen kaun