Test Failure: Transforms/MergeICmps/X86/int64-and-ptr.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i1 @?foo@@YAHAEAUouter@@0@Z(* dereferenceable(16) align(8) %o1, * dereferenceable(116) align(8) %o2) {
%entry:
  %p1 = gep inbounds * dereferenceable(16) align(8) %o1, 16 x i64 0, 1 x i64 0
  %0 = load i64, * %p1, align 8
  %p11 = gep inbounds * dereferenceable(116) align(8) %o2, 16 x i64 0, 1 x i64 0
  %1 = load i64, * %p11, align 8
  %cmp = icmp eq i64 %0, %1
  br i1 %cmp, label %if.then, label %if.end5

%if.then:
  %p2 = gep inbounds * dereferenceable(16) align(8) %o1, 16 x i64 0, 1 x i64 8
  %2 = load *, * %p2, align 8
  %p22 = gep inbounds * dereferenceable(116) align(8) %o2, 16 x i64 0, 1 x i64 8
  %3 = load *, * %p22, align 8
  %cmp3 = icmp eq * %2, %3
  br label %if.end5

%if.end5:
  %rez.0 = phi i1 [ %cmp3, %if.then ], [ 0, %entry ]
  ret i1 %rez.0
}
=>
define i1 @?foo@@YAHAEAUouter@@0@Z(* dereferenceable(16) align(8) %o1, * dereferenceable(116) align(8) %o2) {
%entry+if.then:
  %0 = gep inbounds * dereferenceable(16) align(8) %o1, 16 x i64 0, 1 x i64 0
  %1 = gep inbounds * dereferenceable(116) align(8) %o2, 16 x i64 0, 1 x i64 0
  %cstr = bitcast * %0 to *
  %cstr1 = bitcast * %1 to *
  %memcmp = memcmp * %cstr, * %cstr1, i64 16
  %2 = icmp eq i32 %memcmp, 0
  br label %if.end5

%if.end5:
  ret i1 %2
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
* dereferenceable(16) align(8) %o1 = pointer(non-local, block_id=1, offset=0)
* dereferenceable(116) align(8) %o2 = pointer(non-local, block_id=2, offset=0)

Source:
* %p1 = pointer(non-local, block_id=1, offset=0)
i64 %0 = #x0000000000000000 (0)
* %p11 = pointer(non-local, block_id=2, offset=0)
i64 %1 = #x0000000000000000 (0)
i1 %cmp = #x1 (1)
* %p2 = pointer(non-local, block_id=1, offset=8)
* %2 = null
* %p22 = pointer(non-local, block_id=2, offset=8)
* %3 = pointer(non-local, block_id=0, offset=128)
i1 %cmp3 = #x0 (0)
i1 %rez.0 = #x0 (0)

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

Target:
* %0 = pointer(non-local, block_id=1, offset=0)
* %1 = pointer(non-local, block_id=2, offset=0)
* %cstr = pointer(non-local, block_id=1, offset=0)
* %cstr1 = pointer(non-local, block_id=2, offset=0)
i32 %memcmp = poison
i1 %2 = poison
Source value: #x0 (0)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 3
Num invalid: 0
Num skips:   0
Num trivial: 1 (25.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 2'
+ /home/nlopes/alive2/build/opt-alive.sh -mtriple=x86_64-unknown-unknown -mergeicmps -verify-dom-info -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MergeICmps/X86/int64-and-ptr.ll --check-prefix=X86

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/MergeICmps/X86/int64-and-ptr.ll --check-prefix=X86

 

<-- Back