Test Failure: Transforms/MergeICmps/X86/pair-int32-int32.ll

Test source: git

Comments: LLVM PR51845

Log:

Source: <stdin>

----------------------------------------
define i1 @opeq1(* nocapture nowrite dereferenceable(8) %a, * nocapture nowrite dereferenceable(8) %b) {
%entry:
  %first.i = gep inbounds * nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 0
  %0 = load i32, * %first.i, align 4
  %first1.i = gep inbounds * nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 0
  %1 = load i32, * %first1.i, align 4
  %cmp.i = icmp eq i32 %0, %1
  br i1 %cmp.i, label %land.rhs.i, label %opeq1.exit

%land.rhs.i:
  %second.i = gep inbounds * nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 4
  %2 = load i32, * %second.i, align 4
  %second2.i = gep inbounds * nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 4
  %3 = load i32, * %second2.i, align 4
  %cmp3.i = icmp eq i32 %2, %3
  br label %opeq1.exit

%opeq1.exit:
  %4 = phi i1 [ 0, %entry ], [ %cmp3.i, %land.rhs.i ]
  ret i1 %4
}
=>
define i1 @opeq1(* nocapture nowrite dereferenceable(8) %a, * nocapture nowrite dereferenceable(8) %b) {
%entry+land.rhs.i:
  %0 = gep inbounds * nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 0
  %1 = gep inbounds * nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 0
  %cstr = bitcast * %0 to *
  %cstr1 = bitcast * %1 to *
  %memcmp = memcmp * %cstr, * %cstr1, i64 8
  %2 = icmp eq i32 %memcmp, 0
  br label %opeq1.exit

%opeq1.exit:
  ret i1 %2
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @opeq1_inverse(* nocapture nowrite dereferenceable(8) %a, * nocapture nowrite dereferenceable(8) %b) {
%entry:
  %first.i = gep inbounds * nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 4
  %0 = load i32, * %first.i, align 4
  %first1.i = gep inbounds * nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 4
  %1 = load i32, * %first1.i, align 4
  %cmp.i = icmp eq i32 %0, %1
  br i1 %cmp.i, label %land.rhs.i, label %opeq1.exit

%land.rhs.i:
  %second.i = gep inbounds * nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 0
  %2 = load i32, * %second.i, align 4
  %second2.i = gep inbounds * nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 0
  %3 = load i32, * %second2.i, align 4
  %cmp3.i = icmp eq i32 %2, %3
  br label %opeq1.exit

%opeq1.exit:
  %4 = phi i1 [ 0, %entry ], [ %cmp3.i, %land.rhs.i ]
  ret i1 %4
}
=>
define i1 @opeq1_inverse(* nocapture nowrite dereferenceable(8) %a, * nocapture nowrite dereferenceable(8) %b) {
%land.rhs.i+entry:
  %0 = gep inbounds * nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 0
  %1 = gep inbounds * nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 0
  %cstr = bitcast * %0 to *
  %cstr1 = bitcast * %1 to *
  %memcmp = memcmp * %cstr, * %cstr1, i64 8
  %2 = icmp eq i32 %memcmp, 0
  br label %opeq1.exit

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

Example:
* nocapture nowrite dereferenceable(8) %a = pointer(non-local, block_id=1, offset=28, attrs=3)
* nocapture nowrite dereferenceable(8) %b = pointer(non-local, block_id=2, offset=0, attrs=3)

Source:
* %first.i = pointer(non-local, block_id=1, offset=32, attrs=3)
i32 %0 = #x00000202 (514)
* %first1.i = pointer(non-local, block_id=2, offset=4, attrs=3)
i32 %1 = #x04010101 (67174657)
i1 %cmp.i = #x0 (0)
* %second.i = pointer(non-local, block_id=1, offset=28, attrs=3)
i32 %2 = poison
* %second2.i = pointer(non-local, block_id=2, offset=0, attrs=3)
i32 %3 = poison
i1 %cmp3.i = poison
i1 %4 = #x0 (0)

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

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


------------------- SMT STATS -------------------
Num queries: 6
Num invalid: 0
Num skips:   0
Num trivial: 17 (73.9%)
Num timeout: 1 (16.7%)
Num errors:  0 (0.0%)
Num SAT:     3 (50.0%)
Num UNSAT:   2 (33.3%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh '-passes=require<domtree>,mergeicmps,verify<domtree>' -mtriple=x86_64-unknown-unknown -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MergeICmps/X86/pair-int32-int32.ll --check-prefix=X86

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MergeICmps/X86/pair-int32-int32.ll --check-prefix=X86

 

<-- Back