The Proto-Germanic (PG) diphthong *ai generally becomes ei in Old Norse (ON), except regularly before an original *h and commonly before r (but only from PG *r, not from rhotacised PG *z).
Examples are easy to find:
- PG stainaz > ON steinn ‘stone’
- PG hlaiƀaz > ON hleifr ‘loaf’
- PG taihwō > ON tá ‘toe’
- PG maiza- > ON meir- ‘more’
But the name Óláfr < PG *Anu-laiƀaz ‘ancestral inheritor’ (or something like that) is an odd exception. The PG *ai comes before *ƀ, so we’d expect ON ei as the outcome.
To be sure, the form Óleifr does exist as a variant, but Óláfr is by far the more common of the two. Oddly, the simplex form (without the prefix *anu-) is exclusively Leifr, both as a common noun and as a proper name.
So why does this particular word have this unexpected vowel?