No, its not.
Like any input that statistically creates a disadvantage for any group defined by a protected criteria, it will, if challenged as discriminatory, require the user to demonstrate that there is sufficient evidence establishing that it is a reasonable predictor of job performance.
There is a pervasive myth that IQ tests specifically are "mostly illegal" in the US stemming from an early employment discrimination case in which the particular use was determined to be illegal, but its worth noting that in that case the IQ test was applied widely, it was part of a set of policies that were direct replacements for a policy of explicit racial discrimination (adopted once the company was subjected to nondiscrimination rules), and there was no evidence that could be offered linking it to performance in the jobs for which it was used. [0]
(It's perhaps worth noting that the case also addressed educational requirements -- the specific one at issue was a high-school diploma requirement -- which was found illegal in the particular use for the same reason as the particular use of the IQ test was, but for some reason no one has gone from that to adopting the idea that specific educational attainment requirements are generally illegal.)
[0] Griggs v. Duke Power Co., 401 U.S. 424 (1971)