There are attempts to make portable IRs, like PNaCL and WebAssembly, but it's difficult to make something both portable and super-performant at the same time. You'd probably need to have some kind of optional SIMD, and variant function support so that both the SIMD and scalar versions exist and are both hand-optimized. Then paper over some other issues like unaligned memory access and the amount of masking in shift counts.
That would be enough to get it good on all of x86/ARM/RISCs I think, but to go further and support Alpha or VLIW machines well you'd need to include a lot of metadata in the IR to provide aliasing info, a problem I don't think anyone has taken seriously.
(Everyone always says "this language is good enough as long as you're not writing video codecs or something!". Well, I am writing video codecs or something.)
I'm not sure about SIMD. It's possible to recover (more likely, create by loop unrolling) parallelism that can be turned into SIMD code on the LLVM level. That's what LLVM already does.
Autovectorization for SIMD is, well, not great. The worst problems with it are when you run it against already SIMDed code (it tends to mess it up), which doesn't apply here, but it also tends to fail a lot and it relies on a lot of memory aliasing info. That's why it works well in Fortran, which is much looser than C.
I think a reasonable portable bytecode would have stricter memory rules than C and so would be harder to optimize like this.
So that's why I proposed having variants, but you could also invent some abstract vector operations and then scalarize them if they're not available. That's how shader languages do it.
That would be enough to get it good on all of x86/ARM/RISCs I think, but to go further and support Alpha or VLIW machines well you'd need to include a lot of metadata in the IR to provide aliasing info, a problem I don't think anyone has taken seriously.
(Everyone always says "this language is good enough as long as you're not writing video codecs or something!". Well, I am writing video codecs or something.)