Test Failure: Transforms/MergeICmps/X86/entry-block-shuffled.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i1 @opeq1(* nocapture nowrite dereferenceable(16) %a, * nocapture nowrite dereferenceable(16) %b) {
%entry:
  %first.i = gep inbounds * nocapture nowrite dereferenceable(16) %a, 16 x i64 0, 1 x i64 12
  %0 = load i32, * %first.i, align 4
  %first1.i = gep inbounds * nocapture nowrite dereferenceable(16) %b, 16 x i64 0, 1 x i64 8
  %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(16) %a, 16 x i64 0, 1 x i64 0
  %2 = load i32, * %second.i, align 4
  %second2.i = gep inbounds * nocapture nowrite dereferenceable(16) %b, 16 x i64 0, 1 x i64 0
  %3 = load i32, * %second2.i, align 4
  %cmp3.i = icmp eq i32 %2, %3
  br i1 %cmp3.i, label %land.rhs.i.2, label %opeq1.exit

%land.rhs.i.2:
  %third.i = gep inbounds * nocapture nowrite dereferenceable(16) %a, 16 x i64 0, 1 x i64 4
  %4 = load i32, * %third.i, align 4
  %third2.i = gep inbounds * nocapture nowrite dereferenceable(16) %b, 16 x i64 0, 1 x i64 4
  %5 = load i32, * %third2.i, align 4
  %cmp4.i = icmp eq i32 %4, %5
  br i1 %cmp4.i, label %land.rhs.i.3, label %opeq1.exit

%land.rhs.i.3:
  %fourth.i = gep inbounds * nocapture nowrite dereferenceable(16) %a, 16 x i64 0, 1 x i64 12
  %6 = load i32, * %fourth.i, align 4
  %fourth2.i = gep inbounds * nocapture nowrite dereferenceable(16) %b, 16 x i64 0, 1 x i64 12
  %7 = load i32, * %fourth2.i, align 4
  %cmp5.i = icmp eq i32 %6, %7
  br label %opeq1.exit

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

%entry2:
  %3 = gep inbounds * nocapture nowrite dereferenceable(16) %a, 16 x i64 0, 1 x i64 12
  %4 = gep inbounds * nocapture nowrite dereferenceable(16) %b, 16 x i64 0, 1 x i64 8
  %5 = load i32, * %3, align 4
  %6 = load i32, * %4, align 4
  %7 = icmp eq i32 %5, %6
  br i1 %7, label %land.rhs.i.31, label %opeq1.exit

%land.rhs.i.31:
  %8 = gep inbounds * nocapture nowrite dereferenceable(16) %a, 16 x i64 0, 1 x i64 12
  %9 = gep inbounds * nocapture nowrite dereferenceable(16) %b, 16 x i64 0, 1 x i64 12
  %10 = load i32, * %8, align 4
  %11 = load i32, * %9, align 4
  %12 = icmp eq i32 %10, %11
  br label %opeq1.exit

%opeq1.exit:
  %13 = phi i1 [ %12, %land.rhs.i.31 ], [ 0, %entry2 ], [ 0, %land.rhs.i+land.rhs.i.2 ]
  ret i1 %13
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:
* nocapture nowrite dereferenceable(16) %a = pointer(non-local, block_id=1, offset=76, attrs=3)
* nocapture nowrite dereferenceable(16) %b = pointer(non-local, block_id=1, offset=20, attrs=3)

Source:
* %first.i = pointer(non-local, block_id=1, offset=88, attrs=3)
i32 %0 = #x08000810 (134219792)
* %first1.i = pointer(non-local, block_id=1, offset=28, attrs=3)
i32 %1 = #x00010000 (65536)
i1 %cmp.i = #x0 (0)
* %second.i = pointer(non-local, block_id=1, offset=76, attrs=3)
i32 %2 = poison
* %second2.i = pointer(non-local, block_id=1, offset=20, attrs=3)
i32 %3 = poison
i1 %cmp3.i = poison
* %third.i = pointer(non-local, block_id=1, offset=80, attrs=3)
i32 %4 = poison
* %third2.i = pointer(non-local, block_id=1, offset=24, attrs=3)
i32 %5 = poison
i1 %cmp4.i = poison
* %fourth.i = pointer(non-local, block_id=1, offset=88, attrs=3)
i32 %6 = #x08000810 (134219792)
* %fourth2.i = pointer(non-local, block_id=1, offset=32, attrs=3)
i32 %7 = poison
i1 %cmp5.i = poison
i1 %8 = #x0 (0)

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

Target:
* %0 = pointer(non-local, block_id=1, offset=76, attrs=3)
* %1 = pointer(non-local, block_id=1, offset=20, attrs=3)
* %cstr = pointer(non-local, block_id=1, offset=76, attrs=3)
* %cstr3 = pointer(non-local, block_id=1, offset=20, attrs=3)
i32 %memcmp = poison
i1 %2 = poison
* %3 = pointer(non-local, block_id=1, offset=88, attrs=3)
* %4 = pointer(non-local, block_id=1, offset=28, attrs=3)
i32 %5 = #x08000810 (134219792)
i32 %6 = #x00010000 (65536)
i1 %7 = #x0 (0)
* %8 = pointer(non-local, block_id=1, offset=88, attrs=3)
* %9 = pointer(non-local, block_id=1, offset=32, attrs=3)
i32 %10 = #x08000810 (134219792)
i32 %11 = poison
i1 %12 = poison
i1 %13 = #x0 (0)



------------------- SMT STATS -------------------
Num queries: 6
Num invalid: 0
Num skips:   0
Num trivial: 28 (82.4%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     6 (100.0%)
Num UNSAT:   0 (0.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -mergeicmps -verify-dom-info -mtriple=x86_64-unknown-unknown -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MergeICmps/X86/entry-block-shuffled.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MergeICmps/X86/entry-block-shuffled.ll

 

<-- Back