[LLVMdev] A quick update on FreeBSD support
Chris Lattner
sabre at nondot.org
Tue May 27 21:28:32 PDT 2008
On May 24, 2008, at 4:25 PM, Marcel Moolenaar wrote:
> On May 24, 2008, at 12:12 PM, Bill Wendling wrote:
>> Let us know if you would like extra eyes on the two PPC failures.
>> Many
>> of us have a lot of experience with C++. :-) Do you know where these
>> allocations are?
>
> I don't mind if people help out, so here's some information:
Nice!
>>> My current plan is as follows:
>>> o Resolve powerpc failures to bring it in line with amd64 & i386.
>>> o Adding support for inline assembly for ia64 (already started) and
>>> improving ia64 in general. This is longer term work...
>>
>> Is the lack of inline assembly the cause of the 21 regressions on
>> ia64? Or is it something more systemic?
>
> No, not entirely. I added some debug printf's and I see them
> pop up in the output, but there are more failures:
>
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/GC/
> frame_size.ll
> Failed with exit(1) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/GC/frame_size.ll | llc -asm-verbose | grep {frame
> size} | grep -v 0x0
> Assertion failed: (ResNo < NumValues && "Illegal result number!"),
> function getValueType, file /dumpster/home/marcel/LLVM/src/llvm/
> include/llvm/CodeGen/SelectionDAGNodes.h, line 1220.
>
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2003-05-27-phifcmpd.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/2003-05-27-phifcmpd.ll | llc
This looks like the isel pass is creating an LD8 node with no chain
result:
0x1204e00: i64 = LD8 0x1204da0
This patch should help:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080526/062966.html
This now looks like the fp compare issue below.
>
>
> .ident "LLVM-ia64"
>
> .psr lsb
> .radix C
> .psr abi64
> Cannot yet select: 0x2000000001d76120: i1 = setcc 0x2000000001d46520,
> 0x2000000001d48240, 0x2000000001d08fe0
>
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2003-05-27-useboolinotherbb.ll
This looks like ia64 backend isn't handling 'setune' (set if unordered
or not equal), and looks like an easy place to start. Check out
IA64InstrInfo.td, around line 292 for a place to start:
def FCMPEQ : AForm_DAG<0x03, 0x0b, (outs PR:$dst), (ins FP:$src1, FP:
$src2),
"fcmp.eq $dst, p0 = $src1, $src2",
[(set PR:$dst, (seteq FP:$src1, FP:$src2))]>, isF;
def FCMPGT : AForm_DAG<0x03, 0x0b, (outs PR:$dst), (ins FP:$src1, FP:
$src2),
"fcmp.gt $dst, p0 = $src1, $src2",
[(set PR:$dst, (setgt FP:$src1, FP:$src2))]>, isF;
...
You probably just need another line for setune. It looks like several
other FP compares are missing, you might want to make sure the full
list in lib/Target/TargetSelectionDAG.td:843 is supported.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2003-05-27-usefsubasbool.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/2003-05-27-usefsubasbool.ll | llc
Same thing.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2005-10-21-longlonggtu.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/2005-10-21-longlonggtu.ll | llc
Fixed:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080526/062967.html
> .psr lsb
> .radix C
> .psr abi64
> Assertion failed: (MVT::isInteger(VT) &&
> MVT::isInteger(Operand.getValueType()) && "Invalid TRUNCATE!"),
> function getNode, file /dumpster/home/marcel/LLVM/src/llvm/lib/
> CodeGen/
> SelectionDAG/SelectionDAG.cpp, line 2011.
I assume this is the same.
>
>
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2006-04-28-Sign-extend-bool.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/2006-04-28-Sign-extend-bool.ll | llc
This should now be fixed:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080526/062965.html
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2007-04-08-MultipleFrameIndices.ll for PR1308,1557
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll | llc
I get:
Couldn't allocate output reg for contraint 'r'!
so it looks like inline asm related.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2007-04-27-LargeMemObject.ll for PR1557
Likewise.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> 2008-02-20-MatchingMem.ll for PR1133
Likewise.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/i128-
> addsub.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/i128-addsub.ll | llc
>
> .ident "LLVM-ia64"
>
> .psr lsb
> .radix C
> .psr abi64
> Cannot yet select: 0x2000000001d78120: i64,flag = adde
> 0x2000000001d3c520, 0x2000000001d3c3e0, 0x2000000001d3cc00:1
This is ia64 not supporting add/sub with carry on i64 values. This
should also be relatively easy to tackle.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> multiple-return-values-cross-block-with-invoke.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll |
> llc
This is ia64 not handling multiple return values correctly. The
calling convention stuff should switch over to using the new
"autogenerate from .td files" mechanism the other backends are now
using.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/nested-
> select.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/nested-select.ll | llc -o /dev/null -f
> Cannot yet select: 0x2000000001d78120: i1 = setcc 0x2000000001d3a5c0,
> 0x2000000001d4c2b0, 0x2000000001d08e00
more missing FP comparisons.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/print-
> arith-fp.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/print-arith-fp.ll | llc
Likewise.
>
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
> select.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/Generic/select.ll | llc
> .ret.sptk.many rp
> Cannot yet select: 0x2000000001d78120: i1 = setcc 0x2000000001d44ca0,
> 0x2000000001d44d40, 0x2000000001d095e0
Likewise.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/X86/2007-10-04-
> AvoidEFLAGSCopy.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/X86/2007-10-04-AvoidEFLAGSCopy.ll | llc | not grep pushf
> Assertion failed: (MVT::isInteger(VT) &&
> MVT::isInteger(Operand.getValueType()) && "Invalid TRUNCATE!"),
> function getNode, file /dumpster/home/marcel/LLVM/src/llvm/lib/
> CodeGen/
> SelectionDAG/SelectionDAG.cpp, line 2011.
I assume this is fixed.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/X86/fold-
> load.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
> CodeGen/X86/fold-load.ll | llc
This looks like some issue with loads. The IA64 backend is doing some
funky stuff with custom isel'ing various loads. It may have been
required in the past, but can now probably be all moved to the .td
file, cleaning up a lot of gross code in IA64ISelDAGToDAG.cpp.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/X86/memcpy-2.ll
> Failed with exit(1) at line 2
This should be fixed on mainline.
> FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/ExecutionEngine/
> 2003-08-21-EnvironmentTest.ll
> Failed with signal(SIGABRT) at line 2
> while running: lli 2003-08-21-EnvironmentTest.ll.tmp.bc > /dev/null
> Assertion failed: (BitWidth == RHS.BitWidth && "Comparison requires
> equal bit widths"), function operator==, file /dumpster/home/marcel/
> LLVM/src/llvm/lib/Support/APInt.cpp, line 518.
I can't repro this one. Is it trying to run the jit or is this an
abort in the interpreter?
Hope this helps. It looks like the remaining issues are pretty simple.
-Chris
More information about the llvm-dev
mailing list