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:
  %0 = icmp ugt i32 %start, 64
  %umax = select i1 %0, i32 %start, i32 64
  %1 = sub i32 %umax, %start
  %2 = add i32 %start, 1
  %3 = icmp sgt i32 %limit, %2
  %smax = select i1 %3, i32 %limit, i32 %2
  %4 = add i32 %smax, 4294967295
  %5 = sub i32 %4, %start
  %6 = icmp ult i32 %5, %1
  %umin = select i1 %6, i32 %5, i32 %1
  %7 = icmp ne i32 %1, %umin
  %8 = icmp ne i32 %5, %umin
  br label %for.body

%for.body:
  br i1 %7, label %continue, label %for.end

%continue:
  br label %for.inc

%for.inc:
  br i1 %8, 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 = undef
i32 %limit = poison
i32 %start = #x80000000 (2147483648, -2147483648)

Source:
i32 %i = #x80000000 (2147483648, -2147483648)
i1 %within_limits = #x0 (0)
i64 %i.i64 = #x0000000080000000 (2147483648)
* %arrayidx = poison
i32 %val = poison
i32 %i.inc = #x80000001 (2147483649, -2147483647)
i1 %cmp = poison

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

Target:
i1 %0 = #x1 (1)
i32 %umax = #x80000000 (2147483648, -2147483648)
i32 %1 = #x00000000 (0)
i32 %2 = #x80000001 (2147483649, -2147483647)
i1 %3 = poison
i32 %smax = poison
i32 %4 = poison
i32 %5 = poison
i1 %6 = poison
i32 %umin = poison
i1 %7 = poison
i1 %8 = poison



------------------- SMT STATS -------------------
Num queries: 3
Num invalid: 0
Num skips:   0
Num trivial: 0 (0.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     2 (66.7%)
Num UNSAT:   1 (33.3%)

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/scripts/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

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/IndVarSimplify/post-inc-range.ll

 

<-- Back