Compiler autovectorization can be configured to target SSE, AVX or AVX2. You can build multiple executables if you want to support all. However autovectorization almost never works with the current vector instruction sets. AVX-512 and ARM SVE are new instruction sets that are designed to be easier to autovectorize than the current SSE/AVX/AVX2. But these instruction sets do not yet exist in consumer products.Can't this be resolved in the compiler?
Pretty much all games are currently written using vector intrinsics. Each CPU has different intrinsics that are not compatible. For example the PPC based (last gen) consoles had VMX and VMX-128 vector intrinsics. ARM mobile processors have NEON vector intrinsics. x86/x64 processors have MMX, MMX2, SSE, SSE2, SSE3, SSSE3, SSE4, AVX and AVX2 intrinsics. If the programmer uses AVX intrinsics, the binary will not run on older CPU than Sandy Bridge.
Intel has emulator to support newer SSE/AVX instruction sets on older hardware:
https://software.intel.com/en-us/articles/intel-software-development-emulator
Some people have used this emulator to play "No Man's Sky" on AMD Phenom:
https://steamcommunity.com/app/275850/discussions/1/360672304898078434/
This vector instruction emulator is designed to help developers to prototype their code before new hardware is available. It is not designed to provide best possible performance. No Man's Sky seems to use very small amount of SSE4.1 intrinsics, so emulating it on SSE4 hardware seems plausible (as only a handful of instructions are missing). But emulating 256 bit wide AVX on SSE4.1 is going to be much slower as the instruction sets differ so much (3 operand VEX encoding, twice as wide, etc). Every AVX instruction needs to be emulated. I would expect a big performance slow down.