Bhai Gurdas at one place in his Varan (I.49) construes "vahiguru" as an acrostic using the first consonants of the names of four divine incarnations of the Hindu tradition appearing in four successive eons.
For example, the Sikh salutation 'Waheguru Ji Ki Fateh' is used in the Bala Janamsakhi, however this term only gained currency during the reign of Guru Gobind Singh.