When a subject is a whether-clause, it can be extraposed:
[Whether (or not) he comes] makes no difference. (basic version)
It makes no difference [whether (or not) he comes]. (extraposed)
The logical subject is "extraposed", pulled out of its basic position and moved to the end of the sentence. Since the sentence needs a grammatical subject, dummy it appears in its place at the beginning.
Can an if-clause be used as an extraposed subject, too?
*[If he comes] makes no difference. (basic version)
It makes no difference [if he comes]. (extraposed)
Is the extraposed version okay? It's unclear because the basic version seems to be ungrammatical.