Test source: git
Comments: __memset_chk() not recognized as a builtin on purpose. Need to detect this case.
Source: <stdin> ---------------------------------------- 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 = poison Source: ptr %1 = UB triggered! SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 Block 1 > size: 0 align: 2 alloc type: 0 Block 2 > align: 2 alloc type: 0 Block 3 > align: 2 alloc type: 0 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: 6 Num invalid: 0 Num skips: 0 Num trivial: 0 (0.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 6 (100.0%) Num UNSAT: 0 (0.0%) 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/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