if you had told me earlier
Conditional/hypothetical expression
If you had told me earlier, everything would be different.
If you had told me earlier, I would have changed my plans.
—Why did you get upset? —If you had told me earlier, nothing would have happened.