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

Test source: git

Comments: Alive2 missing support for unnamed_addr

Log:

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

----------------------------------------
declare void @zed(ptr, ptr)
declare void @helper(ptr)

@var1 = constant 4 bytes, align 8
@var2 = constant 4 bytes, align 8
@var3 = constant 4 bytes, align 8
@var4 = constant 4 bytes, align 8
@var5 = constant 16 bytes, align 16
@var6 = constant 16 bytes, align 1
@var7 = constant 16 bytes, align 1
@var8 = constant 16 bytes, align 1

define i32 @main() {
init:
  store {i32} { 2 }, ptr @var1, align 8
  store {i32} { 2 }, ptr @var3, align 8
  store [16 x i8] { 102, 111, 111, 49, 98, 97, 114, 50, 102, 111, 111, 51, 98, 97, 114, 0 }, ptr @var5, align 16
  store [16 x i8] { 102, 111, 111, 49, 98, 97, 114, 50, 102, 111, 111, 51, 98, 97, 114, 0 }, ptr @var6, align 1
  br label %entry

entry:
  call void @zed(ptr @var1, ptr @var2)
  call void @zed(ptr @var3, ptr @var4)
  call void @helper(ptr @var5)
  call void @helper(ptr @var6)
  call void @helper(ptr @var7)
  call void @helper(ptr @var8)
  ret i32 0
}
=>
declare void @zed(ptr, ptr)
declare void @helper(ptr)

@var4 = constant 4 bytes, align 8
@var2 = constant 4 bytes, align 8
@var8 = constant 16 bytes, align 16
@var7 = constant 16 bytes, align 1

define i32 @main() {
init:
  br label %entry

entry:
  call void @zed(ptr @var4, ptr @var2)
  call void @zed(ptr @var2, ptr @var4)
  call void @helper(ptr @var8)
  call void @helper(ptr @var8)
  call void @helper(ptr @var7)
  call void @helper(ptr @var8)
  ret i32 0
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:

Source:
UB triggered on br

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: 0
Block 1 >	size: 8	align: 8	alloc type: 0	alive: true	address: 176	const
Block 2 >	size: 8	align: 8	alloc type: 0	alive: true	address: 64	const
Block 3 >	size: 8	align: 8	alloc type: 0	alive: true	address: 128	const
Block 4 >	size: 8	align: 8	alloc type: 0	alive: true	address: 144	const
Block 5 >	size: 16	align: 16	alloc type: 0	alive: true	address: 32	const
Block 6 >	size: 16	align: 1	alloc type: 0	alive: true	address: 200	const
Block 7 >	size: 16	align: 1	alloc type: 0	alive: true	address: 240	const
Block 8 >	size: 16	align: 1	alloc type: 0	alive: true	address: 1	const
Block 9 >	size: 1	align: 1	alloc type: 0	alive: true	address: 240

Target:
UB triggered on br


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' '-S' '-passes=constmerge' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_sOctVDv2_Lpm1.bc"


------------------- SMT STATS -------------------
Num queries: 42
Num invalid: 0
Num skips:   0
Num trivial: 0 (0.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     27 (64.3%)
Num UNSAT:   15 (35.7%)
Alive2: Transform doesn't verify; aborting!

stderr:

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

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

 

<-- Back