Test Failure: Transforms/Sink/call.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i32 @test_sink_no_stores(i1 %z) {
%0:
  %l = call i32 @f_load_global() nowrite
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  ret i32 %l
}
=>
define i32 @test_sink_no_stores(i1 %z) {
%0:
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  %l = call i32 @f_load_global() nowrite
  ret i32 %l
}
Transformation seems to be correct!


----------------------------------------
@A = global 4 bytes, align 4
@B = global 4 bytes, align 4

define i32 @test_sink_argmem_store(i1 %z) {
%0:
  %l = call i32 @f_load_arg(* @A) nowrite argmemonly
  store i32 0, * @B, align 4
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  ret i32 %l
}
=>
@B = global 4 bytes, align 4
@A = global 4 bytes, align 4

define i32 @test_sink_argmem_store(i1 %z) {
%0:
  store i32 0, * @B, align 4
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  %l = call i32 @f_load_arg(* @A) nowrite argmemonly
  ret i32 %l
}
Transformation seems to be correct!


----------------------------------------
@A = global 4 bytes, align 4
@B = global 4 bytes, align 4

define i32 @test_sink_argmem_call(i1 %z) {
%0:
  %l = call i32 @f_load_arg(* @A) nowrite argmemonly
  call void @f_store_arg(* @B) argmemonly
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  ret i32 %l
}
=>
@B = global 4 bytes, align 4
@A = global 4 bytes, align 4

define i32 @test_sink_argmem_call(i1 %z) {
%0:
  call void @f_store_arg(* @B) argmemonly
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  %l = call i32 @f_load_arg(* @A) nowrite argmemonly
  ret i32 %l
}
Transformation seems to be correct!


----------------------------------------
@A = global 4 bytes, align 4
@B = global 4 bytes, align 4

define i32 @test_sink_argmem_multiple(i1 %z) {
%0:
  %l = call i32 @f_load_arg(* @A) nowrite argmemonly
  call void @f_readonly_arg(* @A, * @B) argmemonly
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  ret i32 %l
}
=>
@A = global 4 bytes, align 4
@B = global 4 bytes, align 4

define i32 @test_sink_argmem_multiple(i1 %z) {
%0:
  call void @f_readonly_arg(* @A, * @B) argmemonly
  br i1 %z, label %true, label %false

%false:
  ret i32 0

%true:
  %l = call i32 @f_load_arg(* @A) nowrite argmemonly
  ret i32 %l
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:
i1 %z = #x1 (1)

Source:
i32 %l = #xffffffff (4294967295, -1)

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

Target:
i32 %l = poison



------------------- SMT STATS -------------------
Num queries: 18
Num invalid: 0
Num skips:   0
Num trivial: 2 (10.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     5 (27.8%)
Num UNSAT:   13 (72.2%)

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/Sink/call.ll
+ /home/nlopes/alive2/scripts/opt-alive.sh -basicaa -sink -S

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/Sink/call.ll

 

<-- Back