Test Failure: Transforms/MemCpyOpt/fca2memcpy.ll

Test source: git

Comments: Alive#345

Log:

Source: <stdin>

----------------------------------------
define void @copy(* %src, * %dst) {
%0:
  %1 = load {*, i8, i24, i32}, * %src, align 8
  store {*, i8, i24, i32} %1, * %dst, align 8
  ret void
}
=>
define void @copy(* %src, * %dst) {
%0:
  %1 = bitcast * %dst to *
  %2 = bitcast * %src to *
  memmove * %1 align 8, * %2 align 8, i64 16
  ret void
}
Transformation doesn't verify!
ERROR: Timeout

ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias

----------------------------------------
define void @destroysrc(* %src, * %dst) {
%0:
  %1 = load {*, i8, i24, i32}, * %src, align 8
  store {*, i8, i24, i32} { null, 0, poison, 0 }, * %src, align 8
  store {*, i8, i24, i32} %1, * %dst, align 8
  ret void
}
=>
define void @destroysrc(* %src, * %dst) {
%0:
  %1 = load {*, i8, i24, i32}, * %src, align 8
  %2 = bitcast * %src to *
  memset * %2 align 8, i8 0, i64 16
  store {*, i8, i24, i32} %1, * %dst, align 8
  ret void
}
Transformation seems to be correct!

ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias

----------------------------------------
define void @copyalias(* %src, * %dst) {
%0:
  %1 = load {*, i8, i24, i32}, * %src, align 8
  %2 = load {*, i8, i24, i32}, * %src, align 8
  store {*, i8, i24, i32} %1, * %dst, align 8
  store {*, i8, i24, i32} %2, * %dst, align 8
  ret void
}
=>
define void @copyalias(* %src, * %dst) {
%0:
  %1 = load {*, i8, i24, i32}, * %src, align 8
  %2 = bitcast * %dst to *
  %3 = bitcast * %src to *
  memmove * %2 align 8, * %3 align 8, i64 16
  store {*, i8, i24, i32} %1, * %dst, align 8
  ret void
}
Transformation seems to be correct!


----------------------------------------
define void @addrproducer(* %src, * %dst) {
%0:
  %1 = load {*, i8, i24, i32}, * %src, align 8
  store {*, i8, i24, i32} undef, * %dst, align 8
  %dst2 = gep * %dst, 16 x i64 1
  store {*, i8, i24, i32} %1, * %dst2, align 8
  ret void
}
=>
define void @addrproducer(* %src, * %dst) {
%0:
  %1 = bitcast * %dst to *
  %dst2 = gep * %dst, 16 x i64 1
  %2 = bitcast * %dst2 to *
  %3 = bitcast * %src to *
  memmove * %2 align 8, * %3 align 8, i64 16
  memset * %1 align 8, i8 undef, i64 16
  ret void
}
Transformation doesn't verify!
ERROR: Mismatch in memory

Example:
* %src = pointer(non-local, block_id=2, offset=0)
* %dst = pointer(non-local, block_id=2, offset=0)

Source:
{*, i8, i24, i32} %1 = { poison, #x00 (0), #x000000 (0), #x00000000 (0) }
* %dst2 = pointer(non-local, block_id=2, offset=16)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 64	alloc type: 0
Block 1 >	size: 3	align: 0	alloc type: 0
Block 2 >	size: 136	align: 8	alloc type: 0
Block 3 >	size: 3	align: 2	alloc type: 0

Target:
* %1 = pointer(non-local, block_id=2, offset=0)
* %dst2 = pointer(non-local, block_id=2, offset=16)
* %2 = pointer(non-local, block_id=2, offset=16)
* %3 = pointer(non-local, block_id=2, offset=0)

Mismatch in pointer(non-local, block_id=2, offset=4)
Source value: null, byte offset=-4
Target value: #x01


------------------- SMT STATS -------------------
Num queries: 12
Num invalid: 0
Num skips:   0
Num trivial: 8 (40.0%)
Num timeout: 1 (8.3%)
Num errors:  0 (0.0%)
Num SAT:     5 (41.7%)
Num UNSAT:   6 (50.0%)

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/scripts/opt-alive.sh -memcpyopt -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll

Alive2: Transform doesn't verify; aborting!
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll

 

<-- Back