Compatibility of .ll file among different versions of LLVM


I am wondering what is the compatibility of .ll file. For example, for
a .ll file generated by an older version of LLVM, can it be guaranteed
to be assembled to a bc file using a newer version of LLVM and run
correctly? Thanks.

The policy is documented here:

Basically, .ll files have no guarantees at all: you must assemble them
with the same compiler that generated them. Newer LLVMs can read .bc
files from 3.0 onwards (if not, report a bug), but we reserve the
right to break compatibility at some point in the future (giving
sufficient warnings etc).