Test Failure: Transforms/IndVarSimplify/post-inc-range.ll

Test source: git

Log:

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 = #xeffffff2 (4026531826, -268435470)

Source:
i32 %i = #xeffffff2 (4026531826, -268435470)
i1 %within_limits = #x0 (0)
i64 %i.i64 = #x00000000effffff2 (4026531826)
* %arrayidx = poison
i32 %val = poison
i32 %i.inc = #xeffffff3 (4026531827, -268435469)
i1 %cmp = poison

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 4	alloc type: 0
Block 1 >	align: 4	alloc type: 0

Target:
i32 %umax = #xeffffff2 (4026531826, -268435470)
i32 %0 = #x00000000 (0)
i32 %1 = #xeffffff3 (4026531827, -268435469)
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!

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/build/opt-alive.sh -indvars -indvars-post-increment-ranges -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/IndVarSimplify/post-inc-range.ll

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

 

<-- Back