Test source: git
Comments: __memset_chk() not recognized as a builtin on purpose. Need to detect this case.
Source: <stdin> ---------------------------------------- declare ptr @__memset_chk(ptr, i32, i64, i64) define void @test_nobuiltin(ptr %dst, i64 %len) { #0: %#1 = call ptr @__memset_chk(ptr %dst, i32 0, i64 %len, i64 -1) ret void } => define void @test_nobuiltin(ptr %dst, i64 %len) { #0: memset ptr %dst align 1, i8 0, i64 %len ret void } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: ptr %dst = null i64 %len = #x0000000000000001 (1) Source: ptr %#1 = function did not return! SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x0000000000000000 Block 1 > size: 0 align: 1 alloc type: 0 alive: true address: #x0000000000000008 Block 2 > size: 0 align: 1 alloc type: 1 alive: true address: #x000000000000000c Block 3 > size: 0 align: 1 alloc type: 4 alive: true address: #x000000000000000c Target: void = UB triggered! TARGET MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x0000000000000000 Block 1 > size: 0 align: 1 alloc type: 0 alive: true address: #x0000000000000008 Block 2 > size: 0 align: 1 alloc type: 1 alive: true address: #x000000000000000c Block 3 > size: 0 align: 1 alloc type: 4 alive: true address: #x000000000000000c Pass: Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-tv' '-S' '-mtriple=x86_64' '-disable-simplify-libcalls' '-codegenprepare' '-tv' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' ------------------- SMT STATS ------------------- Num queries: 38 Num invalid: 0 Num skips: 0 Num trivial: 2 (5.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 34 (89.5%) Num UNSAT: 4 (10.5%) Alive2: Transform doesn't verify; aborting!
Transforms/CodeGenPrepare/X86/memset_chk-simplify-nobuiltin.ll' FAILED ******************** Exit Code: 2 Command Output (stdout): -- # RUN: at line 2 /home/nlopes/alive2/build/opt-alive.sh -S -mtriple=x86_64 -disable-simplify-libcalls -codegenprepare < /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/X86/memset_chk-simplify-nobuiltin.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/X86/memset_chk-simplify-nobuiltin.ll # executed command: /home/nlopes/alive2/build/opt-alive.sh -S -mtriple=x86_64 -disable-simplify-libcalls -codegenprepare # .---command stderr------------ # `----------------------------- # error: command failed with exit status: 1 # executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/X86/memset_chk-simplify-nobuiltin.ll # .---command stderr------------ # | FileCheck error: '<stdin>' is empty. # | FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/X86/memset_chk-simplify-nobuiltin.ll # `----------------------------- # error: command failed with exit status: 2 --