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

Test source: git

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

Log:

Source: <stdin>

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

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

Source:

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0
Block 1 >	size: 7	align: 2	alloc type: 0
Block 2 >	size: 4	align: 2	alloc type: 0

Target:
i8 %1 = poison

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


------------------- SMT STATS -------------------
Num queries: 5
Num invalid: 0
Num skips:   0
Num trivial: 6 (54.5%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     4 (80.0%)
Num UNSAT:   1 (20.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /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