Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor ERROR: Unsupported instruction: %gep = getelementptr i8, ptr addrspace(7) @p7, i32 1 ERROR: Unsupported instruction: %__constexpr_0 = addrspacecast ptr addrspace(7) getelementptr (i8, ptr addrspa ERROR: Unsupported instruction: %select = select i1 %c, ptr %p0, ptr addrspacecast (ptr addrspace(7) getelemen -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- declare ptr @malloc(i64) alloc-family(malloc) allockind(alloc, uninitialized) allocsize(0) declare void @free(nocapture ptr) alloc-family(malloc) allockind(free) define i64 @weird_identity_but_ok(i64 %sz) { entry: %call = tail call ptr @malloc(noundef i64 %sz) nofree noundef nothrow noalias willreturn alloc-family(malloc) allockind(alloc, uninitialized) allocsize(0) memory(inaccessiblemem: readwrite) %calc_size = objectsize ptr %call, i1 0, i1 1 tail call void @free(nocapture noundef allocptr ptr %call) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite) ret i64 %calc_size } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- declare ptr @malloc(i64) alloc-family(malloc) allockind(alloc, uninitialized) allocsize(0) declare void @free(nocapture ptr) alloc-family(malloc) allockind(free) define i64 @weird_identity_but_ok(i64 %sz) { entry: %call = tail call ptr @malloc(noundef i64 %sz) nofree noundef nothrow noalias willreturn alloc-family(malloc) allockind(alloc, uninitialized) allocsize(0) memory(inaccessiblemem: readwrite) %calc_size = objectsize ptr %call, i1 0, i1 1 tail call void @free(nocapture noundef allocptr ptr %call) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite) ret i64 %calc_size } => define i64 @weird_identity_but_ok(i64 %sz) { entry: %#0 = icmp ne i64 %sz, -1 assume i1 %#0 ret i64 %sz } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: i64 %sz = #xffffffffffffffff (18446744073709551615, -1) Source: ptr %call = null i64 %calc_size = #x0000000000000000 (0) Function @free returned SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x0000000000000000 LOCAL BLOCKS: Block 2 > size: 9223372036854775807 align: 8 alloc type: 2 alive: false Block 3 > size: 0 align: 1 alloc type: 0 alive: false address: #x0000000000000000 Target: i1 %#0 = #x0 (0) void = UB triggered! TARGET MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x0000000000000000 Pass: InstCombinePass Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=instcombine' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_NYNv59DH_PUR4.bc" ------------------- SMT STATS ------------------- Num queries: 16 Num invalid: 0 Num skips: 0 Num trivial: 4 (20.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 12 (75.0%) Num UNSAT: 4 (25.0%) Alive2: Transform doesn't verify; aborting!
Transforms/InstCombine/builtin-dynamic-object-size.ll' FAILED ******************** Exit Code: 2 Command Output (stdout): -- # RUN: at line 2 /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll # executed command: /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S # .---command stderr------------ # `----------------------------- # error: command failed with exit status: 1 # executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll # .---command stderr------------ # | FileCheck error: '<stdin>' is empty. # | FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll # `----------------------------- # error: command failed with exit status: 2 --