Test Failure: Transforms/ConstantMerge/merge-dbg.ll

Test source: git

Log:

Source: <stdin>
-- 1. ConstantMergePass
-- 2. ConstantMergePass

----------------------------------------
@a = constant 4 bytes, align 4
@b = constant 4 bytes, align 4

define void @test1(ptr %P1, ptr %P2) {
init:
  store i32 1, ptr @a, align 4
  store i32 1, ptr @b, align 4
  br label %#0

#0:
  store ptr @a, ptr %P1, align 8
  store ptr @b, ptr %P2, align 8
  ret void
}
=>
@b = constant 4 bytes, align 4
@a = constant 4 bytes, align 4

define void @test1(ptr %P1, ptr %P2) {
init:
  store i32 1, ptr @b, align 4
  br label %#0

#0:
  store ptr @b, ptr %P1, align 8
  store ptr @b, ptr %P2, align 8
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Mismatch in memory

Example:
ptr %P1 = pointer(non-local, block_id=3, offset=0) / Address=#x08
ptr %P2 = pointer(non-local, block_id=3, offset=0) / Address=#x08

Source:
UB triggered on br

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 4	alloc type: 0	alive: false	address: 0
Block 1 >	size: 4	align: 4	alloc type: 0	alive: true	address: 4	const
Contents:
poison

Block 2 >	size: 4	align: 4	alloc type: 0	alive: true	address: 224	const
Contents:
poison

Block 3 >	size: 9	align: 1	alloc type: 0	alive: true	address: 8
Block 4 >	size: 3	align: 1	alloc type: 0	alive: true	address: 1
Contents:
0: pointer(non-local, block_id=2, offset=0), byte offset=0
1: pointer(non-local, block_id=1, offset=0), byte offset=1
*: poison


Target:
UB triggered on br

Mismatch in pointer(non-local, block_id=1, offset=0)
Source value: #x00000001
Target value: poison

Pass: ConstantMergePass
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=constmerge' '-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_d2Uf1QLE_BeGM.bc"


------------------- SMT STATS -------------------
Num queries: 45
Num invalid: 0
Num skips:   0
Num trivial: 7 (13.5%)
Num timeout: 1 (2.2%)
Num errors:  0 (0.0%)
Num SAT:     25 (55.6%)
Num UNSAT:   19 (42.2%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 1: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/ConstantMerge/merge-dbg.ll -passes=constmerge -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ConstantMerge/merge-dbg.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=constmerge -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ConstantMerge/merge-dbg.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ConstantMerge/merge-dbg.ll

 

<-- Back