[llvm-testresults] buildbot failure in The LLVM Compiler Infrastructure on full-llvm-OSX

Duncan Sands baldrick at free.fr
Wed Dec 31 01:10:49 PST 2008


Hi Bill,

> FrontendC/2008-03-24-BitField-And-Alloca.c
...
> This is when LLVM is self-hosted. Please investigate. I'm going to  
> revert your patch temporarily.

this is expected.  I've asked Chris to take a look, but he hasn't
yet (lazy guy!).  It seems that when gcc did the inlining, it
performed a simplification as part of the inlining which llvm is
finding it hard to do now that llvm is doing the inlining.  It is
sroa that should be taking care of it but isn't.  I've attached
a bitcode testcase.

Ciao,

Duncan.
-------------- next part --------------
; ModuleID = '2008-03-24-BitField-And-Alloca.c'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"
	%struct.Key = type { { i32, i32 } }
	%struct.anon = type <{ i8, [3 x i8], i32 }>

define i32 @bar(i64 %key_token2) nounwind {
entry:
	%iospec2 = alloca %struct.Key, align 8		; <%struct.Key*> [#uses=3]
	%iospec = alloca %struct.Key		; <%struct.Key*> [#uses=3]
	%0 = getelementptr %struct.Key* %iospec, i32 0, i32 0, i32 0		; <i32*> [#uses=1]
	store i32 0, i32* %0, align 8
	%1 = getelementptr %struct.Key* %iospec, i32 0, i32 0, i32 1		; <i32*> [#uses=1]
	store i32 0, i32* %1, align 4
	%2 = bitcast %struct.Key* %iospec to i64*		; <i64*> [#uses=1]
	store i64 %key_token2, i64* %2, align 8
	%tmp5 = bitcast %struct.Key* %iospec2 to i64*		; <i64*> [#uses=1]
	store i64 %key_token2, i64* %tmp5, align 8
	%3 = bitcast %struct.Key* %iospec2 to %struct.anon*		; <%struct.anon*> [#uses=1]
	%4 = getelementptr %struct.anon* %3, i32 0, i32 2		; <i32*> [#uses=1]
	%5 = load i32* %4, align 4		; <i32> [#uses=3]
	%6 = and i32 %5, 6144		; <i32> [#uses=1]
	%7 = icmp eq i32 %6, 2048		; <i1> [#uses=1]
	br i1 %7, label %bb.i, label %bb18.i

bb.i:		; preds = %entry
	%8 = getelementptr %struct.Key* %iospec2, i32 0, i32 0, i32 0		; <i32*> [#uses=1]
	%9 = load i32* %8, align 8		; <i32> [#uses=1]
	%10 = and i32 %9, 3584		; <i32> [#uses=1]
	switch i32 %10, label %bb41.i [
		i32 1024, label %bb18.i
		i32 1536, label %bb18.i
		i32 2048, label %bb18.i
	]

bb18.i:		; preds = %bb.i, %bb.i, %bb.i, %entry
	%11 = and i32 %5, 960		; <i32> [#uses=1]
	switch i32 %11, label %foo.exit [
		i32 0, label %bb32.i
		i32 512, label %bb32.i
	]

bb32.i:		; preds = %bb18.i, %bb18.i
	%12 = lshr i32 %5, 6		; <i32> [#uses=1]
	%13 = trunc i32 %12 to i8		; <i8> [#uses=1]
	%14 = add i8 %13, 11		; <i8> [#uses=1]
	%mask40.i = and i8 %14, 15		; <i8> [#uses=1]
	%not. = icmp ult i8 %mask40.i, 4		; <i1> [#uses=1]
	%retval = zext i1 %not. to i32		; <i32> [#uses=1]
	ret i32 %retval

bb41.i:		; preds = %bb.i
	ret i32 1

foo.exit:		; preds = %bb18.i
	ret i32 0
}


More information about the llvm-testresults mailing list