Test Failure: Transforms/CallSiteSplitting/noduplicate.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define void @noduplicate_caller(i1 %c, * %a_elt, * %b_elt) {
%entry:
  br label %Top

%Top:
  %tobool1 = icmp eq * %a_elt, null
  br i1 %tobool1, label %CallSiteBB, label %NextCond

%NextCond:
  %cmp = icmp ne * %b_elt, null
  br i1 %cmp, label %CallSiteBB, label %End

%CallSiteBB:
  %p = phi i1 [ 0, %Top ], [ %c, %NextCond ]
  call void @noduplicate_callee(* %a_elt, i1 %p)
  br label %End

%End:
  ret void
}
=>
define void @noduplicate_caller(i1 %c, * %a_elt, * %b_elt) {
%entry:
  br label %Top

%Top:
  %tobool1 = icmp eq * %a_elt, null
  br i1 %tobool1, label %CallSiteBB, label %NextCond

%NextCond:
  %cmp = icmp ne * %b_elt, null
  br i1 %cmp, label %CallSiteBB, label %End

%CallSiteBB:
  %p = phi i1 [ 0, %Top ], [ %c, %NextCond ]
  call void @noduplicate_callee(* %a_elt, i1 %p)
  br label %End

%End:
  ret void
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define void @noduplicate_callee(* %a_elt, i1 %c) {
%entry:
  %tobool = icmp ne * %a_elt, null
  br i1 %tobool, label %then, label %endif

%then:
  br label %endif

%endif:
  call void @noduplicate_external(* %a_elt)
  ret void
}
=>
define void @noduplicate_callee(* %a_elt, i1 %c) {
%entry:
  %tobool = icmp ne * %a_elt, null
  br i1 %tobool, label %then, label %endif

%then:
  br label %endif

%endif:
  call void @noduplicate_external(* %a_elt)
  ret void
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define void @reference_caller(i1 %c, * %a_elt, * %b_elt) {
%entry:
  br label %Top

%Top:
  %tobool1 = icmp eq * %a_elt, null
  br i1 %tobool1, label %CallSiteBB, label %NextCond

%NextCond:
  %cmp = icmp ne * %b_elt, null
  br i1 %cmp, label %CallSiteBB, label %End

%CallSiteBB:
  %p = phi i1 [ 0, %Top ], [ %c, %NextCond ]
  call void @nonnoduplicate_callee(* %a_elt, i1 %p)
  br label %End

%End:
  ret void
}
=>
define void @reference_caller(i1 %c, * %a_elt, * %b_elt) {
%entry:
  br label %Top

%Top:
  %tobool1 = icmp eq * %a_elt, null
  br i1 %tobool1, label %Top.split, label %NextCond

%Top.split:
  call void @nonnoduplicate_callee(* null, i1 0)
  br label %CallSiteBB

%NextCond:
  %cmp = icmp ne * %b_elt, null
  br i1 %cmp, label %NextCond.split, label %End

%NextCond.split:
  call void @nonnoduplicate_callee(nonnull * %a_elt, i1 %c)
  br label %CallSiteBB

%CallSiteBB:
  br label %End

%End:
  ret void
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:
i1 %c = poison
* %a_elt = pointer(non-local, block_id=1, offset=-1)
* %b_elt = poison

Source:
i1 %tobool1 = #x1 (1)
i1 %cmp = poison
i1 %p = #x0 (0)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	address: 0
Block 1 >	size: 5	align: 16	alloc type: 0	address: 1
Block 2 >	size: 5	align: 2	alloc type: 0	address: 8
Block 3 >	size: 5	align: 2	alloc type: 0

Target:
i1 %tobool1 = #x1 (1)
i1 %cmp = poison



------------------- SMT STATS -------------------
Num queries: 5
Num invalid: 0
Num skips:   0
Num trivial: 4 (44.4%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     5 (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 -S -callsite-splitting -callsite-splitting-duplication-threshold=100000000
+ /home/nlopes/llvm/build/bin/FileCheck -enable-var-scope /home/nlopes/llvm/llvm/test/Transforms/CallSiteSplitting/noduplicate.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck -enable-var-scope /home/nlopes/llvm/llvm/test/Transforms/CallSiteSplitting/noduplicate.ll

 

<-- Back