>>55146748That does matter, because you have to consider the chance of the egg inheriting the Ditto's ATK IV and the parent's ATK IV separately.
With two perfect 6 IV parents, the odds are 1/6 to get an ideal 5 IV spread, since one stat is always random. If one parent has only the 5 desirable IVs, the odds of getting an ideal 5 IV spread are still 1/6, because in both cases the odds of an undesirable IV being selected for inheritance is 5/6.
But if your Larvitar has only 4 IVs (no ATK and not counting SP.ATK, since we're not selecting for it), then you have to not only hope ATK is selected for inheritance but also hit the 50-50 on it taking the Ditto's ATK instead of Larvitar's. This should half the odds to 1/12.
Although, this is an approximation, and according to a calculator I found online the odds are actually about 10.5%, or a little better than 1/10.
TL;DR Yes it matters and it would be best to have a 5 IV Larvitar, but 4 IV is still pretty good and should be able to produce a 5 IV Larvitar without much trouble.