Thanks Martin and arrowdodger,
That makes sense.

Paul

On 16 Aug 2011, at 10:00, arrowdodger wrote:

> On Sun, Aug 14, 2011 at 9:06 PM, Paul Marinescu 
> <[email protected]> wrote:
> When compiling KLEE (svn head) against LLVM 2.9 on 64bit Ubuntu, the
> POSIX tests never terminate. Upon looking at klee-last/assembly.ll (for
> FDNumbers) it seems that memset recursively calls itself:
> 
> define i8* @memset(i8* %dst, i32 %s, i64 %count) nounwind {
> entry:
>   %0 = icmp eq i64 %count, 0, !dbg !2270
>   br i1 %0, label %bb2, label %bb.lr.ph, !dbg !2270
> 
> bb.lr.ph:                                         ; preds = %entry
>   %1 = trunc i32 %s to i8, !dbg !2271
>   %2 = zext i8 %1 to i32
>   %3 = call i8* @memset(i8* %dst, i32 %2, i64 %count)
>   br label %bb2
> 
> bb2:                                              ; preds = %bb.lr.ph,
> %entry
>   ret i8* %dst, !dbg !2272
> }
> 
> The tests pass after changing in runtime/Intrinsic/memset.c
> char * a = dst to volatile char * a = dst
> 
> but this does not fix the root cause of the problem. Any ideas?
> Compiling memset.c by itself produces correct assembly.
> 
> Thanks,
> Paul
> _______________________________________________
> klee-dev mailing list
> [email protected]
> http://keeda.Stanford.EDU/mailman/listinfo/klee-dev
> 
> This have been fixed in LLVM trunk (it was LoopIdiomRecognizer fault). In 
> your case, you can do this: 
> https://bitbucket.org/arrowdodger/klee/changeset/3844a221bac8

_______________________________________________
klee-dev mailing list
[email protected]
http://keeda.Stanford.EDU/mailman/listinfo/klee-dev

Reply via email to