AVX is unusable, because there is no standard. Each processor has different instructions.
As
@Findecanor said, you presumably mean AVX-512. In that case, the common baseline is basically what Skylake-X had. In the Linux universe, they blessed that as level 4 of the x86-64 ISA pyramid, so to speak, making it a fairly standard compilation target.
New processors do not support older instructions.
The AVX-512 instructions not implemented by newer CPUs are pretty much just some of those found in Xeon Phi, which was a specialty HPC product and thus not an issue for most software out there.
Even the same CPU doesn't support the same instructions on all cores. Is a hell.
That's actually not true. Intel never
supported heterogeneous ISA, even though there were hacks to enable it in the early days after Alder Lake launched.
The only thing that can be trusted to work is SSE4.2, which is almost 2 decades old, but is even supported in ARM and smartphones.
First, AVX & AVX2 are trustworthy, in that any CPU which supports them will implement them fully and consistently. Their biggest issue is just that the E-cores prior to Gracemont (e.g. Jasper/Elkhart Lake, Gemini Lake, Apollo Lake, etc.) didn't support them.
Leaving that aside, SSE4.2 didn't ship until November 2008, which is 15.25 years ago - not really almost 2 decades.