Tool to convert to backend assembly instruction file


I am looking for tool to convert file from either (.s) bytecode or (.bc) bitcode to .asm file. Basically assembly instruction file for my x86 backend. I think so we can use llvm-objdump. However I am not able to figure out its exact options. Could you please tell me how to do that?


Your mention of .s being bytecode confuses me, but if you're asking how to lower a bitcode (.bc) or IR file (.ll) to assembly (.s) than llc is the tool you are looking for.

llc -O2 path/to/bitcode/input.bc -o output.s


Hi Chris,

I am looking for assembly low level machine instruction file. So, input file can be either IR bytecode or executable bit code file and I want output as low level machine instruction file. Assembly file having instructions like mov, push, pop, add, sub etc etc. Command which can take LLVM specific bytecode or bitcode as input and generates assembly file in the output.