Test source: git
Comments: Alive2 missing support for speculatable attribute
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. SimplifyCFGPass ---------------------------------------- define void @one_pred(i8 %v0, i8 %v1) { %pred: %c0 = icmp eq i8 %v0, 0 br i1 %c0, label %dispatch, label %final_right %dispatch: %c1 = icmp eq i8 %v1, 0 br i1 %c1, label %final_left, label %final_right %final_left: call void @sideeffect0() ret void %final_right: call void @sideeffect1() ret void } Transformation seems to be correct! (syntactically equal) -- 3. SimplifyCFGPass ---------------------------------------- define void @one_pred(i8 %v0, i8 %v1) { %pred: %c0 = icmp eq i8 %v0, 0 br i1 %c0, label %dispatch, label %final_right %dispatch: %c1 = icmp eq i8 %v1, 0 br i1 %c1, label %final_left, label %final_right %final_left: call void @sideeffect0() ret void %final_right: call void @sideeffect1() ret void } => define void @one_pred(i8 %v0, i8 %v1) { %pred: %c0 = icmp eq i8 %v0, 0 %c1 = icmp eq i8 %v1, 0 %or.cond = select i1 %c0, i1 %c1, i1 0 br i1 %or.cond, label %final_left, label %final_right %final_right: call void @sideeffect1() br label %common.ret %final_left: call void @sideeffect0() br label %common.ret %common.ret: ret void } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. SimplifyCFGPass ---------------------------------------- define void @two_preds(i8 %v0, i8 %v1, i8 %v2, i8 %v3) { %entry: %c0 = icmp eq i8 %v0, 0 br i1 %c0, label %pred0, label %pred1 %pred1: %c2 = icmp eq i8 %v2, 0 br i1 %c2, label %dispatch, label %final_right %pred0: %c1 = icmp eq i8 %v1, 0 br i1 %c1, label %final_left, label %dispatch %dispatch: %c3 = icmp eq i8 %v3, 0 br i1 %c3, label %final_left, label %final_right %final_left: call void @sideeffect0() ret void %final_right: call void @sideeffect1() ret void } Transformation seems to be correct! (syntactically equal) -- 7. SimplifyCFGPass ---------------------------------------- define void @two_preds(i8 %v0, i8 %v1, i8 %v2, i8 %v3) { %entry: %c0 = icmp eq i8 %v0, 0 br i1 %c0, label %pred0, label %pred1 %pred1: %c2 = icmp eq i8 %v2, 0 br i1 %c2, label %dispatch, label %final_right %pred0: %c1 = icmp eq i8 %v1, 0 br i1 %c1, label %final_left, label %dispatch %dispatch: %c3 = icmp eq i8 %v3, 0 br i1 %c3, label %final_left, label %final_right %final_left: call void @sideeffect0() ret void %final_right: call void @sideeffect1() ret void } => define void @two_preds(i8 %v0, i8 %v1, i8 %v2, i8 %v3) { %entry: %c0 = icmp eq i8 %v0, 0 br i1 %c0, label %pred0, label %pred1 %pred1: %c2 = icmp eq i8 %v2, 0 %c3 = icmp eq i8 %v3, 0 %or.cond = select i1 %c2, i1 %c3, i1 0 br i1 %or.cond, label %final_left, label %final_right %pred0: %c1 = icmp eq i8 %v1, 0 %c3.old = icmp eq i8 %v3, 0 %or.cond1 = select i1 %c1, i1 1, i1 %c3.old br i1 %or.cond1, label %final_left, label %final_right %final_left: call void @sideeffect0() br label %common.ret %final_right: call void @sideeffect1() br label %common.ret %common.ret: ret void } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. SimplifyCFGPass ---------------------------------------- define void @one_pred_with_extra_op(i8 %v0, i8 %v1) { %pred: %c0 = icmp eq i8 %v0, 0 br i1 %c0, label %dispatch, label %final_right %dispatch: %v1_adj = add i8 %v0, %v1 %c1 = icmp eq i8 %v1_adj, 0 br i1 %c1, label %final_left, label %final_right %final_left: call void @sideeffect0() ret void %final_right: call void @sideeffect1() ret void } Transformation seems to be correct! (syntactically equal) -- 11. SimplifyCFGPass ---------------------------------------- define void @one_pred_with_extra_op(i8 %v0, i8 %v1) { %pred: %c0 = icmp eq i8 %v0, 0 br i1 %c0, label %dispatch, label %final_right %dispatch: %v1_adj = add i8 %v0, %v1 %c1 = icmp eq i8 %v1_adj, 0 br i1 %c1, label %final_left, label %final_right %final_left: call void @sideeffect0() ret void %final_right: call void @sideeffect1() ret void } => define void @one_pred_with_extra_op(i8 %v0, i8 %v1) { %pred: %c0 = icmp eq i8 %v0, 0 %v1_adj = add i8 %v0, %v1 %c1 = icmp eq i8 %v1_adj, 0 %or.cond = select i1 %c0, i1 %c1, i1 0 br i1 %or.cond, label %final_left, label %final_right %final_right: call void @sideeffect1() br label %common.ret %final_left: call void @sideeffect0() br label %common.ret %common.ret: ret void } Transformation seems to be correct! -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. SimplifyCFGPass ---------------------------------------- define void @one_pred_with_spec_call(i8 %v0, i8 %v1, ptr %p) { %pred: %c0 = icmp ne ptr %p, null br i1 %c0, label %dispatch, label %final_right %dispatch: %x = call i32 @speculate_call(nonnull ptr %p) memory(argmem: readwrite) %c1 = icmp eq i8 %v1, 0 br i1 %c1, label %final_left, label %final_right %final_left: ret void %final_right: call void @sideeffect0() ret void } Transformation seems to be correct! (syntactically equal) -- 15. SimplifyCFGPass ---------------------------------------- define void @one_pred_with_spec_call(i8 %v0, i8 %v1, ptr %p) { %pred: %c0 = icmp ne ptr %p, null br i1 %c0, label %dispatch, label %final_right %dispatch: %x = call i32 @speculate_call(nonnull ptr %p) memory(argmem: readwrite) %c1 = icmp eq i8 %v1, 0 br i1 %c1, label %final_left, label %final_right %final_left: ret void %final_right: call void @sideeffect0() ret void } => define void @one_pred_with_spec_call(i8 %v0, i8 %v1, ptr %p) { %pred: %c0 = icmp ne ptr %p, null %x = call i32 @speculate_call(nonnull ptr %p) memory(argmem: readwrite) %c1 = icmp eq i8 %v1, 0 %or.cond = select i1 %c0, i1 %c1, i1 0 br i1 %or.cond, label %common.ret, label %final_right %final_right: call void @sideeffect0() br label %common.ret %common.ret: ret void } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: i8 %v0 = poison i8 %v1 = poison ptr %p = null Source: i1 %c0 = #x0 (0) >> Jump to %final_right Function @sideeffect0 returned SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 address: 0 Block 1 > size: 7 align: 8 alloc type: 0 address: 2 Block 2 > size: 0 align: 1 alloc type: 0 Target: i1 %c0 = #x0 (0) Function @speculate_call triggered UB i1 %c1 = UB triggered! Pass: SimplifyCFGPass 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' '-S' '-passes=simplifycfg' '-simplifycfg-require-and-preserve-domtree=1' '-bonus-inst-threshold=10' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' ------------------- SMT STATS ------------------- Num queries: 24 Num invalid: 0 Num skips: 0 Num trivial: 12 (33.3%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 15 (62.5%) Num UNSAT: 9 (37.5%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -S -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -bonus-inst-threshold=10 + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll