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 @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 @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 @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=2, offset=0)

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

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

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


------------------- SMT STATS -------------------
Num queries: 36
Num invalid: 0
Num skips:   0
Num trivial: 63 (63.6%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     14 (38.9%)
Num UNSAT:   22 (61.1%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -instsimplify -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstSimplify/and-or-icmp-nullptr.ll

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