Test source: git
Source: <stdin> ---------------------------------------- define void @test(* %base, i32 %limit, i32 %start) { %for.body.lr.ph: br label %for.body %for.body: %i = phi i32 [ %start, %for.body.lr.ph ], [ %i.inc, %for.inc ] %within_limits = icmp ult i32 %i, 64 br i1 %within_limits, label %continue, label %for.end %continue: %i.i64 = zext i32 %i to i64 %arrayidx = gep inbounds * %base, 4 x i64 %i.i64 %val = load i32, * %arrayidx, align 4 br label %for.inc %for.inc: %i.inc = add nsw nuw i32 %i, 1 %cmp = icmp slt i32 %i.inc, %limit br i1 %cmp, label %for.body, label %for.end %for.end: br label %exit %exit: ret void } => define void @test(* %base, i32 %limit, i32 %start) { %for.body.lr.ph: %umax = umax i32 %start, 64 %0 = sub i32 %umax, %start %1 = add i32 %start, 1 %smax = smax i32 %limit, %1 %2 = add i32 %smax, 4294967295 %3 = sub i32 %2, %start %umin = umin i32 %3, %0 %4 = icmp ne i32 %0, %umin %5 = icmp ne i32 %3, %umin br label %for.body %for.body: br i1 %4, label %continue, label %for.end %continue: br label %for.inc %for.inc: br i1 %5, label %for.body, label %for.end %for.end: br label %exit %exit: ret void } Transformation doesn't verify! ERROR: Source is more defined than target Example: * %base = poison i32 %limit = poison i32 %start = #xdf000622 (3741320738, -553646558) Source: i32 %i = #xdf000622 (3741320738, -553646558) i1 %within_limits = #x0 (0) i64 %i.i64 = #x00000000df000622 (3741320738) * %arrayidx = poison i32 %val = poison i32 %i.inc = #xdf000623 (3741320739, -553646557) i1 %cmp = poison SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 4 alloc type: 0 Block 1 > align: 17179869184 alloc type: 0 Target: i32 %umax = #xdf000622 (3741320738, -553646558) i32 %0 = #x00000000 (0) i32 %1 = #xdf000623 (3741320739, -553646557) i32 %smax = poison i32 %2 = poison i32 %3 = poison i32 %umin = poison i1 %4 = poison i1 %5 = poison ------------------- SMT STATS ------------------- Num queries: 4 Num invalid: 0 Num skips: 0 Num trivial: 8 (66.7%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 4 (100.0%) Num UNSAT: 0 (0.0%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 1' + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/IndVarSimplify/post-inc-range.ll + /home/nlopes/alive2/build/opt-alive.sh -indvars -indvars-post-increment-ranges -S FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/IndVarSimplify/post-inc-range.ll