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 = poison i64 %len = #x0000000000000000 (0) 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: 0 Block 1 > size: 3 align: 1 alloc type: 0 alive: true address: 12 Block 2 > size: 1 align: 1 alloc type: 0 alive: true address: 2 Block 3 > size: 7 align: 1 alloc type: 0 alive: true address: 4 Target: void = UB triggered! 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: 33 Num invalid: 0 Num skips: 0 Num trivial: 1 (2.9%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 27 (81.8%) Num UNSAT: 6 (18.2%) Alive2: Transform doesn't verify; aborting!
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 + /home/nlopes/alive2/build/opt-alive.sh -S -mtriple=x86_64 -disable-simplify-libcalls -codegenprepare + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/X86/memset_chk-simplify-nobuiltin.ll 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