The Sunni-Shia split didn't actually exist during the lifetime of Ali. This is a common popular misconception that because the origins of the Sunni-Shia split go back to succession of Ali that these were somehow fully formed groups contemporary with that succession crisis. Muslims end up promoting this view as well as they often try to portray their religious practice as being identical to what was handed down by the prophet Muhammad. There is universal academic consensus that this is not the case.
"Sunnism" as such did not emerge in any meaningful form until the 8th century when the Ulama, the scholarly religious class, started to assert a uniform, hadith-based program of Sharia law. Even then, it would be hard to describe the result as a unified sect as the four schools of law were at each others throats, often quite literally, over what constituted orthodox Islam. It's not until around the 10th century that you end up with a more homogenous orthodox consensus over what Sunni Islam is. Prior to the 8th century the reference is quite often to "proto-Sunnis" but given that the allegiance of most groups was not to the Sunna but rather to the Umayyad or the Abbasid dynasties. So this terminology of proto-Sunni (unless its applied to early members of the Ulama) is quite often anachronistic.
"Alid" or "proto-Shia" are much more straightforward, because even before the emergence of a Shia religious practice different from that of Sunni practice (which for Twelver Shia coalesced around the writings and practice of Jafaar as-Sadiq and following the occultation of the 12th Imam, likewise in the 8th-9th century) there were still large groups of muslims proposing that lineal descent from the house of the prophet was still critical to succession. Where again this kind of thing can get confusing and why it's difficult to say that such a thing as "the Shia" existed until a couple centuries later is that there were multiple and competing such lineages. The Abbasids, who would, after fierce competition with the Ulama, eventually rule as orthodox Sunni caliphs, had significant Alid support, because their claim of descent from the prophet was much closer than that of the Ummayads edit: their movement was also associated with a much closer lineal descendant, and later with Ali Al Ridda, I've oversimplified here, but suffice it to say that these "Sunni" Caliphs had a quite interesting relationship with the Alids. The Twelvers who dominate today likewise had to compete with the Fatimids, who would eventually split into a number of sects, as well as smaller and now extinct lines of succession from the prophet that claimed the Alid mantle.
This is without getting into the major split that Ali had to contend with, and which killed him, which was the various sects of Kharijites.
So no, as far as I'm aware, Ali never commented on the religious practice of "Shia" or "Sunni" because there were no such differences in practice during his lifetime. I would go so far as to doubt the provenance of any quote which purported to comment such a split as being anachronistic. His conflict would have been viewed as a succession crisis, although one with obviously profound religious implications.
All of this is without getting into the issue of sources, which is that as this was a culture that at the time passed down its history orally and these issues carried incredibly political weight many scholars would doubt the reliable existence of any quotes purported to be from Ali whatsoever as being the potential inventions of the future detractors or supporters of his descendants.
Which Ali do you mean?