What compile time languages tend to do is generate all the variants and then patch the one to use at startup (or if they don’t patch, they do a cheap dynamic dispatch since the CPU will predict through the branch and you’re going to be doing this selection exterior to the hot path or else you wouldn’t have bothered to vectorize in the first place).
For example:
https://docs.rs/simdeez/latest/simdeez/