Test source: git
Source: /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll ---------------------------------------- define i32 @foo(i32 %a, i32 %b, i32 %c, i32 %d, * %input) { %entry: %cmp = icmp sgt i32 %d, 3 br i1 %cmp, label %cond.end, label %lor.lhs.false %lor.lhs.false: %mul = shl i32 %c, 1 %add = add nsw i32 %mul, %a %cmp1 = icmp slt i32 %add, %b br i1 %cmp1, label %cond.false, label %cond.end %cond.false: %0 = load i32, * %input, align 4 br label %cond.end %cond.end: %cond = phi i32 [ %0, %cond.false ], [ 0, %lor.lhs.false ], [ 0, %entry ] ret i32 %cond } => define i32 @foo(i32 %a, i32 %b, i32 %c, i32 %d, * %input) { %entry: %cmp = icmp sle i32 %d, 3 %mul = shl i32 %c, 1 %add = add nsw i32 %mul, %a %cmp1 = icmp slt i32 %add, %b %or.cond = and i1 %cmp, %cmp1 br i1 %or.cond, label %cond.false, label %cond.end %cond.false: %0 = load i32, * %input, align 4 br label %cond.end %cond.end: %cond = phi i32 [ %0, %cond.false ], [ 0, %entry ] ret i32 %cond } Transformation doesn't verify! ERROR: Source is more defined than target Example: i32 %a = poison i32 %b = poison i32 %c = poison i32 %d = #x00000004 (4) * %input = poison Source: i1 %cmp = #x1 (1) i32 %mul = poison i32 %add = poison i1 %cmp1 = poison i32 %0 = poison i32 %cond = #x00000000 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 4 alloc type: 0 Block 1 > align: 8589934592 alloc type: 0 Target: i1 %cmp = #x0 (0) i32 %mul = poison i32 %add = poison i1 %cmp1 = poison i1 %or.cond = poison i32 %0 = poison i32 %cond = #x00000000 (0) ------------------- SMT STATS ------------------- Num queries: 2 Num invalid: 0 Num skips: 0 Num trivial: 0 (0.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 2 (100.0%) Num UNSAT: 0 (0.0%)
+ : 'RUN: at line 1' + /home/nlopes/alive2/build/opt-alive.sh /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll --check-prefix=NORMAL + : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -bonus-inst-threshold=2 + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll --check-prefix=AGGRESSIVE Alive2: Transform doesn't verify; aborting! FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll --check-prefix=AGGRESSIVE