Test Failure: Transforms/InstSimplify/and-or-icmp-nullptr.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i1 @ugt_and_min(* %x, * %y) {
%0:
  %cmp = icmp ugt * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ugt_and_min(* %x, * %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_and_min_commute(* %x, * %y) {
%0:
  %cmp = icmp ugt * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ugt_and_min_commute(* %x, * %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_swap_and_min(* %x, * %y) {
%0:
  %cmp = icmp ult * %y, %x
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ugt_swap_and_min(* %x, * %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_swap_and_min_commute(* %x, * %y) {
%0:
  %cmp = icmp ult * %y, %x
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ugt_swap_and_min_commute(* %x, * %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_and_min(* %x, * %y) {
%0:
  %cmp = icmp sgt * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sgt_and_min(* %x, * %y) {
%0:
  %cmp = icmp sgt * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_or_not_min(* %x, * %y) {
%0:
  %cmp = icmp ule * %x, %y
  %cmpeq = icmp ne * %x, null
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_or_not_min(* %x, * %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_or_not_min_commute(* %x, * %y) {
%0:
  %cmp = icmp ule * %x, %y
  %cmpeq = icmp ne * %x, null
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_or_not_min_commute(* %x, * %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_or_not_min(* %x, * %y) {
%0:
  %cmp = icmp uge * %y, %x
  %cmpeq = icmp ne * %x, null
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_swap_or_not_min(* %x, * %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_or_not_min_commute(* %x, * %y) {
%0:
  %cmp = icmp uge * %y, %x
  %cmpeq = icmp ne * %x, null
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_swap_or_not_min_commute(* %x, * %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_or_not_min(* %x, * %y) {
%0:
  %cmp = icmp sle * %x, %y
  %cmpeq = icmp ne * %x, null
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sle_or_not_min(* %x, * %y) {
%0:
  %cmp = icmp sle * %x, %y
  %cmpeq = icmp ne * %x, null
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_and_min(* %x, * %y) {
%0:
  %cmp = icmp ule * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_and_min(* %x, * %y) {
%0:
  %cmpeq = icmp eq * %x, null
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_and_min_commute(* %x, * %y) {
%0:
  %cmp = icmp ule * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_and_min_commute(* %x, * %y) {
%0:
  %cmpeq = icmp eq * %x, null
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_and_min(* %x, * %y) {
%0:
  %cmp = icmp uge * %y, %x
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_swap_and_min(* %x, * %y) {
%0:
  %cmpeq = icmp eq * %x, null
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_and_min_commute(* %x, * %y) {
%0:
  %cmp = icmp uge * %y, %x
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_swap_and_min_commute(* %x, * %y) {
%0:
  %cmpeq = icmp eq * %x, null
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_and_min(* %x, * %y) {
%0:
  %cmp = icmp sle * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sle_and_min(* %x, * %y) {
%0:
  %cmp = icmp sle * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_or_min(* %x, * %y) {
%0:
  %cmp = icmp ule * %x, %y
  %cmpeq = icmp eq * %x, null
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_or_min(* %x, * %y) {
%0:
  %cmp = icmp ule * %x, %y
  ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
* %x = null
* %y = pointer(non-local, block_id=1, offset=0)

Source:
i1 %cmp = undef
i1 %cmpeq = #x1 (1)
i1 %r = #x1 (1)

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

Target:
i1 %cmp = #x0 (0)
Source value: #x1 (1)
Target value: #x0 (0)


------------------- SMT STATS -------------------
Num queries: 33
Num invalid: 0
Num skips:   0
Num trivial: 63 (65.6%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     17 (51.5%)
Num UNSAT:   16 (48.5%)

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/scripts/opt-alive.sh -instsimplify -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstSimplify/and-or-icmp-nullptr.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/InstSimplify/and-or-icmp-nullptr.ll

 

<-- Back