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

Test source: git

Comments: LLVM PR51845

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. RequireAnalysisPass<DominatorTreeAnalysis, Function> : Skipping NOP
-- 3. RequireAnalysisPass<DominatorTreeAnalysis, Function> : Skipping NOP
-- 4. MergeICmpsPass

----------------------------------------
define i1 @opeq1(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
entry:
  %#0 = load i32, ptr nocapture nowrite dereferenceable(8) %a, align 4
  %#1 = load i32, ptr nocapture nowrite dereferenceable(8) %b, 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 ptr nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 4
  %#2 = load i32, ptr %second.i, align 4
  %second2.i = gep inbounds ptr nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 4
  %#3 = load i32, ptr %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
}
Transformation seems to be correct! (syntactically equal)

-- 5. MergeICmpsPass

----------------------------------------
define i1 @opeq1(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
entry:
  %#0 = load i32, ptr nocapture nowrite dereferenceable(8) %a, align 4
  %#1 = load i32, ptr nocapture nowrite dereferenceable(8) %b, 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 ptr nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 4
  %#2 = load i32, ptr %second.i, align 4
  %second2.i = gep inbounds ptr nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 4
  %#3 = load i32, ptr %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
}
=>
declare i32 @memcmp(nocapture ptr, nocapture ptr, i64) nofree willreturn memory(argmem: read)

define i1 @opeq1(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
entry+land.rhs.i:
  %memcmp = memcmp ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b, i64 8
  %#0 = icmp eq i32 %memcmp, 0
  br label %opeq1.exit

opeq1.exit:
  ret i1 %#0
}
Transformation seems to be correct!

-- 6. DominatorTreeVerifierPass

----------------------------------------
declare i32 @memcmp(nocapture ptr, nocapture ptr, i64) nofree willreturn memory(argmem: read)

define i1 @opeq1(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
entry+land.rhs.i:
  %memcmp = memcmp ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b, i64 8
  %#0 = icmp eq i32 %memcmp, 0
  br label %opeq1.exit

opeq1.exit:
  ret i1 %#0
}
Transformation seems to be correct! (syntactically equal)

-- 7. DominatorTreeVerifierPass

----------------------------------------
declare i32 @memcmp(nocapture ptr, nocapture ptr, i64) nofree willreturn memory(argmem: read)

define i1 @opeq1(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
entry+land.rhs.i:
  %memcmp = memcmp ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b, i64 8
  %#0 = icmp eq i32 %memcmp, 0
  br label %opeq1.exit

opeq1.exit:
  ret i1 %#0
}
Transformation seems to be correct! (syntactically equal)

-- 8. PassManager<Function> : Skipping NOP
-- 9. PassManager<Function> : Skipping NOP
-- 10. RequireAnalysisPass<DominatorTreeAnalysis, Function> : Skipping NOP
-- 11. RequireAnalysisPass<DominatorTreeAnalysis, Function> : Skipping NOP
-- 12. MergeICmpsPass

----------------------------------------
define i1 @opeq1_inverse(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
entry:
  %first.i = gep inbounds ptr nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 4
  %#0 = load i32, ptr %first.i, align 4
  %first1.i = gep inbounds ptr nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 4
  %#1 = load i32, ptr %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:
  %#2 = load i32, ptr nocapture nowrite dereferenceable(8) %a, align 4
  %#3 = load i32, ptr nocapture nowrite dereferenceable(8) %b, 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
}
Transformation seems to be correct! (syntactically equal)

-- 13. MergeICmpsPass

----------------------------------------
define i1 @opeq1_inverse(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
entry:
  %first.i = gep inbounds ptr nocapture nowrite dereferenceable(8) %a, 8 x i64 0, 1 x i64 4
  %#0 = load i32, ptr %first.i, align 4
  %first1.i = gep inbounds ptr nocapture nowrite dereferenceable(8) %b, 8 x i64 0, 1 x i64 4
  %#1 = load i32, ptr %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:
  %#2 = load i32, ptr nocapture nowrite dereferenceable(8) %a, align 4
  %#3 = load i32, ptr nocapture nowrite dereferenceable(8) %b, 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
}
=>
declare i32 @memcmp(nocapture ptr, nocapture ptr, i64) nofree willreturn memory(argmem: read)

define i1 @opeq1_inverse(ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b) nofree zeroext {
land.rhs.i+entry:
  %memcmp = memcmp ptr nocapture nowrite dereferenceable(8) %a, ptr nocapture nowrite dereferenceable(8) %b, i64 8
  %#0 = icmp eq i32 %memcmp, 0
  br label %opeq1.exit

opeq1.exit:
  ret i1 %#0
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source

Example:
ptr nocapture nowrite dereferenceable(8) %a = pointer(non-local, block_id=1, offset=3, attrs=3) / Address=#x04
ptr nocapture nowrite dereferenceable(8) %b = pointer(non-local, block_id=2, offset=6, attrs=3) / Address=#x14

Source:
ptr %first.i = pointer(non-local, block_id=1, offset=7, attrs=3) / Address=#x08
i32 %#0 = #x00010101 (65793)
ptr %first1.i = pointer(non-local, block_id=2, offset=10, attrs=3) / Address=#x18
i32 %#1 = #x80000002 (2147483650, -2147483646)
i1 %cmp.i = #x0 (0)
  >> Jump to %opeq1.exit
i1 %#4 = #x0 (0)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: 0
Block 1 >	size: 11	align: 1	alloc type: 0	alive: true	address: 1
Contents:
6: poison
3: #x01
8: #x01
7: #x01
9: #x01
10: #x00
*: poison

Block 2 >	size: 14	align: 2	alloc type: 0	alive: true	address: 14
Contents:
6: poison
11: #x00
13: #x80
12: #x00
10: #x02
*: poison


Target:
i32 %memcmp = poison
i1 %#0 = poison
  >> Jump to %opeq1.exit
Source value: #x0 (0)
Target value: poison

Pass: MergeICmpsPass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=require<domtree>,mergeicmps,verify<domtree>' '-mtriple=x86_64-unknown-unknown' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_N3FvYBob_oJDS.bc"


------------------- SMT STATS -------------------
Num queries: 46
Num invalid: 0
Num skips:   0
Num trivial: 13 (22.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     31 (67.4%)
Num UNSAT:   15 (32.6%)
Alive2: Transform doesn't verify; aborting!

stderr:

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

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

 

<-- Back