Test Failure: Transforms/InstCombine/memcpy-to-load.ll

Test source: git

Comments: LLVM bug: memcpy -> i8 load/store

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
ERROR: Unsupported metadata: 7
-- 1. PassManager<Function> : Skipping NOP
-- 2. InstCombinePass

----------------------------------------
define void @copy_1_byte(ptr %d, ptr %s) {
#0:
  memcpy ptr %d align 1, ptr %s align 1, i32 1
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
define void @copy_1_byte(ptr %d, ptr %s) {
#0:
  memcpy ptr %d align 1, ptr %s align 1, i32 1
  ret void
}
=>
define void @copy_1_byte(ptr %d, ptr %s) {
#0:
  %#1 = load i8, ptr %s, align 1
  store i8 %#1, ptr %d, align 1
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Mismatch in memory

Example:
ptr %d = pointer(non-local, block_id=1, offset=0)
ptr %s = pointer(non-local, block_id=1, offset=0)

Source:

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: 0
Block 1 >	size: 8	align: 281474976710656	alloc type: 0	alive: true	address: 3
Contents:
*: null, byte offset=2

Block 2 >	size: 1	align: 1	alloc type: 0	alive: true	address: 2
Contents:
*: null, byte offset=2


Target:
i8 %#1 = poison

Mismatch in pointer(non-local, block_id=1, offset=0)
Source value: null, byte offset=2
Target value: poison

Pass: InstCombinePass
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=instcombine' '-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_Y4Lt7G6F_V8yU.bc"


------------------- SMT STATS -------------------
Num queries: 29
Num invalid: 0
Num skips:   0
Num trivial: 6 (17.1%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     15 (51.7%)
Num UNSAT:   14 (48.3%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcpy-to-load.ll -passes=instcombine -S                         | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcpy-to-load.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcpy-to-load.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcpy-to-load.ll

 

<-- Back