Test Failure: Transforms/MemCpyOpt/fca2memcpy.ll

Test source: git

Comments: Alive#345

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias
-- 1. PassManager<Function> : Skipping NOP
-- 2. MemCpyOptPass

----------------------------------------
define void @copy(ptr %src, ptr %dst) {
#0:
  %#1 = load {ptr, i8, i24, i32}, ptr %src, align 8
  store {ptr, i8, i24, i32} %#1, ptr %dst, align 8
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. MemCpyOptPass

----------------------------------------
define void @copy(ptr %src, ptr %dst) {
#0:
  %#1 = load {ptr, i8, i24, i32}, ptr %src, align 8
  store {ptr, i8, i24, i32} %#1, ptr %dst, align 8
  ret void
}
=>
define void @copy(ptr %src, ptr %dst) {
#0:
  memmove ptr %dst align 8, ptr %src align 8, i64 16
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Mismatch in memory

Example:
ptr %src = pointer(non-local, block_id=1, offset=0) / Address=#x08
ptr %dst = pointer(non-local, block_id=1, offset=0) / Address=#x08

Source:
{ptr, i8, i24, i32} %#1 = { pointer(non-local, block_id=0, offset=12) / Address=#x0c, poison, poison, #x00010000 (65536) }

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: #x00
Block 1 >	size: 181	align: 1	alloc type: 4	alive: true	address: #x08
Contents:
6: #x41
7: #x41
3: #x41
0: pointer(non-local, block_id=1, offset=4), byte offset=0
12: #x00
15: #x00
2: #x41
8: poison
14: pointer(non-local, block_id=0, offset=1), byte offset=0
13: #x00
1: #x41
5: #x41
4: #x41
*: poison

Block 2 >	size: 0	align: 1	alloc type: 0	alive: true	address: #x08
Block 3 >	size: 0	align: 1	alloc type: 0	alive: true	address: #x01

Target:

TARGET MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: #x00
Block 1 >	size: 181	align: 1	alloc type: 4	alive: true	address: #x08
Contents:
6: #x41
7: #x41
3: #x41
0: pointer(non-local, block_id=1, offset=4), byte offset=0
12: #x00
15: #x00
2: #x41
8: poison
14: pointer(non-local, block_id=0, offset=1), byte offset=0
13: #x00
1: #x41
5: #x41
4: #x41
*: poison

Block 2 >	size: 0	align: 1	alloc type: 0	alive: true	address: #x08
Block 3 >	size: 0	align: 1	alloc type: 0	alive: true	address: #x01

Mismatch in pointer(non-local, block_id=1, offset=7)
Source value: pointer(non-local, block_id=0, offset=12), byte offset=7
Target value: #x41

Pass: MemCpyOptPass
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=memcpyopt' '-S' '-verify-memoryssa' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_Y8hjjHE5_BykX.bc"

------------------- SMT STATS -------------------
Num queries: 36
Num invalid: 0
Num skips:   0
Num trivial: 9 (20.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     23 (63.9%)
Num UNSAT:   13 (36.1%)
Alive2: Transform doesn't verify; aborting!

stderr:

Transforms/MemCpyOpt/fca2memcpy.ll' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/nlopes/alive2/build/opt-alive.sh -passes=memcpyopt -S < /bitbucket/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll -verify-memoryssa | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll
# executed command: /home/nlopes/alive2/build/opt-alive.sh -passes=memcpyopt -S -verify-memoryssa
# .---command stderr------------
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll
# `-----------------------------
# error: command failed with exit status: 2

--

 

<-- Back