search for: test2_gen

Displaying 2 results from an estimated 2 matches for "test2_gen".

2011 Mar 16
5
[LLVMdev] Bug in opt
...problem. I'm writing a C compiler in my favorite programming language (don't ask :-) I have made a .s file, which can be correctly assembled and run with lli. But when I optimize it I get no errors from the optimizer, but the resultant file is incorrect. Here's what happens: llvm-as test2_gen.s %% no errors test2_gen.s.bc is produced lli test2_gen.s.bc n=887459712 %% no errors opt -std-compile-opts -S test2_gen.s.bc > test2_opt.s.bc %% no errors %% But now the generated file cannon be disassembled or run lli test2_opt.s.bc lli: error loading program 'test2_opt.s...
2011 Mar 16
0
[LLVMdev] Bug in opt
Hi Joe, > I have made a .s file, which can be correctly assembled > and run with lli. But when I optimize it I get no errors > from the optimizer, but the resultant file is incorrect. > > Here's what happens: > > llvm-as test2_gen.s %% no errors test2_gen.s.bc is produced there's actually no need to assemble this to bitcode: you can pass test2_gen.s directly to opt. At least you can in recent versions of LLVM. > opt -std-compile-opts -S test2_gen.s.bc> test2_opt.s.bc By using -S you ask opt to produce human...