This is neat, I had no idea there was an intermediate language like this which is cross platform. It would seem that I could decompile binaries using llvm tooling and then recompile for other platforms.
I'm afraid not, because the LLVM IR does not abstract for things like endianess, word size, header file contents, or many other things that are platform dependent.
LLVM IR is pretty close to portable - the issues you mention are an issue with Assembler code as well. Even the examples in the article show the same IR being compiled to different CPU architectures.
I'm not sure I'd go hand writing IR code, though. It's pretty easy to just write C code with vector extensions, etc to produce the IR I'd be after. When I do need to write assembler code these days, it's typically to get access to some privileged instructions in kernel space. Most other instructions are available in C code via __builtin_foo_bar functions.
http://stackoverflow.com/questions/6981810/translation-of-ma...
Obviously not cross os, but might be good for bare metal stuff. I've gotten libraries in the past compiled with weird ABIs. This sounds really neat.