[LLVMdev] A quick update on FreeBSD support

Marcel Moolenaar
Sat, 24 May 2008 23:25:30 -0000

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:

FAIL: /nfs/llvm/src/llvm/test/Transforms/PredicateSimplifier/
2006-11-04-ReplacingZeros.ll
Failed with signal(SIGABRT) at line 1
while running: llvm-as < /nfs/llvm/src/llvm/test/Transforms/
PredicateSimplifier/2006-11-04-ReplacingZeros.ll | opt -predsimplify -
disable-output
Assertion failed: (validPredicate(R) && "Invalid predicate."),
function update, file /nfs/llvm/src/llvm/lib/Transforms/Scalar/
PredicateSimplifier.cpp, line 702.

xserve% Debug/bin/llvm-as < /nfs/llvm/src/llvm/test/Transforms/
PredicateSimplifier/2006-11-04-ReplacingZeros.ll > x.bc

xserve% gdb Debug/bin/opt
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "powerpc-marcel-freebsd"...
(gdb) set args -predsimplify -disable-output < x.bc
(gdb) run
Starting program: /nfs/llvm/obj/powerpc/Debug/bin/opt -predsimplify -
disable-output < x.bc
[New LWP 100048]
[New Thread 0x2002040 (LWP 100048)]
Assertion failed: (validPredicate(R) && "Invalid predicate."),
function update, file /nfs/llvm/src/llvm/lib/Transforms/Scalar/
PredicateSimplifier.cpp, line 702.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x2002040 (LWP 100048)]
0x2229ce08 in kill () from /lib/libc.so.7
(gdb) bt
#0  0x2229ce08 in kill () from /lib/libc.so.7
#1  0x22000848 in raise () from /lib/libthr.so.3
#2  0x2229b6a4 in abort () from /lib/libc.so.7
#3  0x22281d80 in __assert () from /lib/libc.so.7
#4  0x01c34a78 in update (this=0x200c940, n=1515870810, R=1515870810,
Subtree=0x20298c0) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
PredicateSimplifier.cpp:702
#5  0x01c3d134 in makeEqual (this=0x7fffd550, V1=0x2009730,
V2=0x2006624) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
PredicateSimplifier.cpp:1614
#6  0x01c3db18 in solve (this=0x7fffd550) at /nfs/llvm/src/llvm/lib/
Transforms/Scalar/PredicateSimplifier.cpp:2151
#7  0x01c3f95c in visitBranchInst (this=0x7fffd648, BI=@0x2006714) at /
nfs/llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:2447
#8  0x01c3fb90 in visitBr (this=0x7fffd648, I=@0x2006714) at
Instruction.def:98
#9  0x01c40038 in visit (this=0x7fffd648, I=@0x2006714) at
Instruction.def:98
#10 0x01c40aa8 in visitInstruction (this=0x2006790, I=0x2006714,
DT=0x2029800) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
PredicateSimplifier.cpp:2376
#11 0x01c40c48 in visitBasicBlock (this=0x2006790, Node=0x2029800) at /
nfs/llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:2320
#12 0x01c410b8 in runOnFunction (this=0x2006790, F=@0x2006510) at /nfs/
llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:2398
#13 0x01e84760 in llvm::FPPassManager::runOnFunction (this=0x2021080,
F=@0x2006510) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1178
#14 0x01e84998 in llvm::FPPassManager::runOnModule (this=0x2021080,
M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1198
#15 0x01e84218 in llvm::MPPassManager::runOnModule (this=0x202c110,
M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1248
#16 0x01e84474 in llvm::PassManagerImpl::run (this=0x201d100,
M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1322
#17 0x01e84534 in llvm::PassManager::run (this=0x7fffdb10,
M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1354
#18 0x01a70774 in main (argc=3, argv=0x7fffdbc4) at /nfs/llvm/src/llvm/
tools/opt/opt.cpp:431
(gdb) frame 5
#5  0x01c3d134 in makeEqual (this=0x7fffd550, V1=0x2009730,
V2=0x2006624) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
PredicateSimplifier.cpp:1614
1614	              IG.node(n1)->update(NI->To, NI->LV, Top);
(gdb) p NI
$1 = ((anonymous namespace)::InequalityGraph::Edge *) 0x2036390
(gdb) p /x *NI
$2 = {To = 0x5a5a5a5a, LV = 0x5a5a5a5a, Subtree = 0x5a5a5a5a}
(gdb) p NE
$3 = ((anonymous namespace)::InequalityGraph::Edge *) 0x203639c
(gdb) p /x *NE
$4 = {To = 0x5a5a5a5a, LV = 0x5a5a5a5a, Subtree = 0x5a5a5a5a}

Both NI and NE are defined by the for loop:

1603	          for (Node::iterator NI = IG.node(n)->begin(), NE =
IG.node(n)->end();
1604	               NI != NE; ++NI) {

In this case:

(gdb) p n
$5 = 4
(gdb) p IG.node(n)->begin()
$12 = ((anonymous namespace)::InequalityGraph::Edge *) 0x1f59378
(gdb) p IG.node(n)->end()
$14 = ((anonymous namespace)::InequalityGraph::Edge *) 0xa5a5a5a5

>> 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

.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
Failed with signal(SIGABRT) at line 1
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
CodeGen/Generic/2003-05-27-useboolinotherbb.ll | llc

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
Cannot yet select: 0x2000000001d76120: i1 = setcc 0x2000000001d463e0,
0x2000000001d341d0, 0x2000000001d08f20

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

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
Cannot yet select: 0x2000000001d76120: i1 = setcc 0x2000000001d463e0,
0x2000000001d341d0, 0x2000000001d08f20

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

.ident "LLVM-ia64"

	.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.

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

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
Cannot yet select: 0x2000000001d523e0: i64 = sign_extend_inreg
0x2000000001d52340, 0x2000000001d08f80

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

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
NODE: 0x2000000001d09460: i32 = TargetConstant <1>
Assertion failed: (0 && "Do not know how to promote this
operator!"),
function PromoteOp, file /dumpster/home/marcel/LLVM/src/llvm/lib/
CodeGen/SelectionDAG/LegalizeDAG.cpp, line 4089.

FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
2007-04-27-LargeMemObject.ll for PR1557
Failed with exit(1) at line 1
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
CodeGen/Generic/2007-04-27-LargeMemObject.ll | llc

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
XXX: getRegForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegClassForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegClassForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegClassForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegClassForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegClassForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegClassForInlineAsmConstraint
Could not match memory address.  Inline asm failure!

FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/Generic/
2008-02-20-MatchingMem.ll for PR1133
Failed with exit(1) at line 1
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
CodeGen/Generic/2008-02-20-MatchingMem.ll | llc

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
XXX: getRegForInlineAsmConstraint
XXX: getRegForInlineAsmConstraint
XXX: getRegClassForInlineAsmConstraint
Could not match memory address.  Inline asm failure!

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

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

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
Assertion failed: (0 && "Unknown type!"), function
getValueType, file /
dumpster/home/marcel/LLVM/src/llvm/lib/VMCore/ValueTypes.cpp, line 108.

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

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

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
Cannot yet select: 0x2000000001d7dd90: i1 = setcc 0x2000000001d82100,
0x2000000001d82220, 0x2000000001d09ac0

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

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64



	.section .text, "ax", "progbits"

	.align	32
	.global	testConsts
	.type	testConsts, @function
testConsts:
	alloc r3 = ar.pfs,0,0,0,0
	// PSEUDO_ALLOC
	;;
	mov ar.pfs = r3
	br.ret.sptk.many rp


	.align	32
	.global	unusedBool
	.type	unusedBool, @function
unusedBool:
	alloc r3 = ar.pfs,0,0,0,0
	// PSEUDO_ALLOC
	;;
	mov ar.pfs = r3
	br.ret.sptk.many rp


	.align	32
	.global	mergeConstants
	.type	mergeConstants, @function
mergeConstants:
	alloc r3 = ar.pfs,0,0,0,0
	// PSEUDO_ALLOC
.BB3_1:	// Top
	(p0) brl.cond.sptk .BB3_1	// Top
.BB3_2:	// Next
	(p0) brl.cond.sptk .BB3_1	// Top


	.align	32
	.global	castconst
	.type	castconst, @function
castconst:
	;;
	alloc r3 = ar.pfs,0,0,0,0
	// PSEUDO_ALLOC
	adds r8 = 0, r0
	;;
	mov ar.pfs = r3
	br.ret.sptk.many rp


	.align	32
	.global	testbool
	.type	testbool, @function
testbool:
	alloc r3 = ar.pfs,0,2,0,0
	// PSEUDO_ALLOC
.BB5_1:	// Top
	add r8 = r32, r33
	;;
	adds r9 = 4, r8
	;;
	sxt4 r9 = r9
	adds r10 = 1, r0
	;;
	cmp.lt p6, p0 = r9, r10
	;;
	(p6) brl.cond.sptk .BB5_3	// retlbl
.BB5_2:	// loop
	adds r9 = 4, r8
	;;
	sxt4 r9 = r9
	adds r10 = 0, r0
	;;
	cmp.gt p6, p0 = r9, r10
	;;
	(p6) brl.cond.sptk .BB5_2	// loop
	(p0) brl.cond.sptk .BB5_1	// Top
.BB5_3:	// retlbl
	mov ar.pfs = r3
	br.ret.sptk.many rp


	.align	32
	.global	castbool
	.type	castbool, @function
castbool:
	alloc r3 = ar.pfs,0,2,0,0
	// PSEUDO_ALLOC
	sxt4 r9 = r33
	sxt4 r10 = r32
	adds r8 = 0, r0
	;;
	cmp.lt p6, p0 = r10, r9
	;;
	(p6) add r8 = 1, r8
	mov ar.pfs = r3
	;;
	br.ret.sptk.many rp


	.align	32
	.global	boolexpr
	.type	boolexpr, @function
boolexpr:
	alloc r3 = ar.pfs,0,2,0,0
	// PSEUDO_ALLOC
	sxt4 r8 = r33
	adds r9 = -1, r0
	cmp.ne p6, p0 = r32, r0
	cmp.eq p7, p0 = r0, r0
	;;
	cmp.gt p8, p0 = r8, r9
	(p7) cmp.eq.unc p7, p0 = r0, r0
	;;
	(p8) cmp.ne p7, p0 = r0, r0
	(p6) cmp.eq.unc p6, p0 = r0, r0
	adds r8 = 0, r0
	;;
	(p6) cmp.eq.unc p6, p0 = r0, r0
	;;
	(p7) cmp.ne p6, p0 = r0, r0
	;;
	(p6) add r8 = 1, r8
	mov ar.pfs = r3
	;;
	br.ret.sptk.many rp
Cannot yet select: 0x2000000001d78120: i1 = setcc 0x2000000001d44ca0,
0x2000000001d44d40, 0x2000000001d095e0

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.

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

.ident "LLVM-ia64"

	.psr    lsb
	.radix  C
	.psr    abi64
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/X86/memcpy-2.ll
Failed with exit(1) at line 2
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
CodeGen/X86/memcpy-2.ll | llc -march=x86 -mattr=+sse | grep mov |
count 5
count: expected 5 lines and got        6.
child process exited abnormally
FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/X86/memset.ll
Failed with exit(1) at line 2
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
CodeGen/X86/memset.ll | llc -march=x86 -mattr=+sse | grep mov | count 3
count: expected 3 lines and got        5.
child process exited abnormally
FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/X86/pmul.ll
Failed with exit(1) at line 3
while running: grep mov pmul.ll.tmp | count 8
count: expected 8 lines and got       20.
child process exited abnormally
FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/CodeGen/X86/
vec_shuffle-18.ll
Failed with exit(1) at line 1
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
CodeGen/X86/vec_shuffle-18.ll | llc -march=x86 -mattr=+sse2 | grep mov
| count 7
count: expected 7 lines and got        9.
child process exited abnormally

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.

FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/Transforms/
PredicateSimplifier/2006-10-25-AddSetCC.ll
Failed with exit(1) at line 1
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
Transforms/PredicateSimplifier/2006-10-25-AddSetCC.ll |  opt -
predsimplify -instcombine -simplifycfg | llvm-dis |  grep -v declare |
grep pass | count 2
count: expected 2 lines and got        0.
Assertion failed: (validPredicate(R) && "Invalid predicate."),
function update, file /dumpster/home/marcel/LLVM/src/llvm/lib/
Transforms/Scalar/PredicateSimplifier.cpp, line 701.
llvm-dis: Invalid bitcode signature

FAIL: /dumpster/home/marcel/LLVM/src/llvm/test/Transforms/
PredicateSimplifier/2006-11-04-ReplacingZeros.ll
Failed with signal(SIGABRT) at line 1
while running: llvm-as < /dumpster/home/marcel/LLVM/src/llvm/test/
Transforms/PredicateSimplifier/2006-11-04-ReplacingZeros.ll | opt -
predsimplify -disable-output
Assertion failed: (validPredicate(R) && "Invalid predicate."),
function update, file /dumpster/home/marcel/LLVM/src/llvm/lib/
Transforms/Scalar/PredicateSimplifier.cpp, line 701.

FYI,

--
Marcel Moolenaar
xcllnt at mac.com