[llvm-commits] [llvm] r61915 - in /llvm/trunk: lib/Transforms/Scalar/ScalarReplAggregates.cpp test/Transforms/ScalarRepl/copy-aggregate.ll

Chris Lattner clattner at apple.com
Wed Jan 7 23:59:08 PST 2009


On Jan 7, 2009, at 11:34 PM, Bill Wendling wrote:

> Hi Chris,
>
> This test is failing with this check in. It might need to be updated:
>
> Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/
> FrontendC++/dg.exp ...
> FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/
> FrontendC++/2008-02-13-sret.cpp
> Failed with exit(1) at line 1
> while running: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/
> llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-gcc-4.2 -fstrict-
> aliasing -Wstrict-aliasing -I/usr/include/c++/4.0.0/i686-apple-darwin9
> -I/usr/include/c++/4.0.0 -emit-llvm -w -S -O1 -m32 -emit-llvm / 
> Volumes/
> Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/FrontendC++/
> 2008-02-13-sret.cpp -o - | /usr/bin/grep {store i32} | count 1
> count: expected 1 lines and got        0.
> child process exited abnormally

Nice, scalarrepl is doing a better job, compiling _Z8check242v to:

define i64 @_Z8check242v() nounwind readonly {
entry:
	%0 = load i8** getelementptr (%struct.S242* @s242, i32 0, i32 0),  
align 8		; <i8*> [#uses=1]
	%1 = ptrtoint i8* %0 to i32		; <i32> [#uses=1]
	%2 = load i32* getelementptr (%struct.S242* @s242, i32 0, i32 1, i32  
0), align 4		; <i32> [#uses=1]
	%3 = zext i32 %1 to i64		; <i64> [#uses=1]
	%4 = zext i32 %2 to i64		; <i64> [#uses=1]
	%5 = shl i64 %4, 32		; <i64> [#uses=1]
	%6 = or i64 %5, %3		; <i64> [#uses=1]
	ret i64 %6
}

instead of keeping the temporary alloca.  I just decided to delete the  
test.  Thanks Bill,

-Chris



More information about the llvm-commits mailing list