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

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i1 @test(* dereferenceable(16) align(8) %o1, * dereferenceable(116) align(8) %o2) nofree {
%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 @test(* dereferenceable(16) align(8) %o1, * dereferenceable(116) align(8) %o2) nofree {
%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=1)
* dereferenceable(116) align(8) %o2 = pointer(non-local, block_id=2, offset=1792)

Source:
* %p1 = pointer(non-local, block_id=1, offset=1)
i64 %0 = #x0000000000000000 (0)
* %p11 = pointer(non-local, block_id=2, offset=1792)
i64 %1 = #x0000000000000000 (0)
i1 %cmp = #x1 (1)
* %p2 = pointer(non-local, block_id=1, offset=9)
* %2 = pointer(non-local, block_id=0, offset=512)
* %p22 = pointer(non-local, block_id=2, offset=1800)
* %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	address: 0
Block 1 >	size: 1024	align: 2	alloc type: 0	address: 2951
Block 2 >	size: 2049	align: 8589934592	alloc type: 0	address: 128
Block 3 >	size: 576	align: 4	alloc type: 0	address: 2368
Block 4 >	size: 67	align: 2	alloc type: 0	address: 16

Target:
* %0 = pointer(non-local, block_id=1, offset=1)
* %1 = pointer(non-local, block_id=2, offset=1792)
* %cstr = pointer(non-local, block_id=1, offset=1)
* %cstr1 = pointer(non-local, block_id=2, offset=1792)
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: 19 (86.4%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     2 (66.7%)
Num UNSAT:   1 (33.3%)
Alive2: Transform doesn't verify; aborting!

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
/home/nlopes/llvm/llvm/test/Transforms/MergeICmps/X86/int64-and-ptr.ll:11:16: error: CHECK-LABEL: expected string not found in input
; CHECK-LABEL: @test(
               ^
<stdin>:1:1: note: scanning from here

^
<stdin>:1:11: note: possible intended match here

          ^

Input file: <stdin>
Check file: /home/nlopes/llvm/llvm/test/Transforms/MergeICmps/X86/int64-and-ptr.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1:  
label:11'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
label:11'1               ?                                                            possible intended match
>>>>>>

 

<-- Back