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! (not unsound)
ERROR: Timeout
-- 4. PassManager<Function> : Skipping NOP
-- 5. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: noalias
-- 6. MemCpyOptPass
ERROR: Unsupported attribute: noalias
-- 7. MemCpyOptPass
ERROR: Unsupported attribute: noalias
-- 8. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: noalias
-- 9. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: noalias
-- 10. MemCpyOptPass
ERROR: Unsupported attribute: noalias
-- 11. MemCpyOptPass
ERROR: Unsupported attribute: noalias
-- 12. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: noalias
-- 13. PassManager<Function> : Skipping NOP
-- 14. MemCpyOptPass

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

-- 15. MemCpyOptPass

----------------------------------------
define void @destroysrc(ptr %src, ptr %dst) {
#0:
  %#1 = load {ptr, i8, i24, i32}, ptr %src, align 8
  store {ptr, i8, i24, i32} { null, 0, [padding], 0 }, ptr %src, align 8
  store {ptr, i8, i24, i32} %#1, ptr %dst, align 8
  ret void
}
=>
define void @destroysrc(ptr %src, ptr %dst) {
#0:
  %#1 = load {ptr, i8, i24, i32}, ptr %src, align 8
  memset ptr %src align 8, i8 0, i64 16
  store {ptr, i8, i24, i32} %#1, ptr %dst, align 8
  ret void
}
Transformation doesn't verify! (not unsound)
ERROR: SMT Error: smt tactic failed to show goal to be sat/unsat (incomplete quantifiers)
-- 16. PassManager<Function> : Skipping NOP
-- 17. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: noalias
-- 18. MemCpyOptPass
ERROR: Unsupported attribute: noalias
-- 19. MemCpyOptPass
ERROR: Unsupported attribute: noalias
-- 20. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: noalias
-- 21. PassManager<Function> : Skipping NOP
-- 22. MemCpyOptPass

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

-- 23. MemCpyOptPass

----------------------------------------
define void @copyalias(ptr %src, ptr %dst) {
#0:
  %#1 = load {ptr, i8, i24, i32}, ptr %src, align 8
  %#2 = load {ptr, i8, i24, i32}, ptr %src, align 8
  store {ptr, i8, i24, i32} %#1, ptr %dst, align 8
  store {ptr, i8, i24, i32} %#2, ptr %dst, align 8
  ret void
}
=>
define void @copyalias(ptr %src, ptr %dst) {
#0:
  %#1 = load {ptr, i8, i24, i32}, ptr %src, align 8
  memmove ptr %dst align 8, ptr %src align 8, i64 16
  store {ptr, i8, i24, i32} %#1, ptr %dst, align 8
  ret void
}
Transformation doesn't verify! (not unsound)
ERROR: SMT Error: smt tactic failed to show goal to be sat/unsat (incomplete quantifiers)
-- 24. PassManager<Function> : Skipping NOP
-- 25. PassManager<Function> : Skipping NOP
-- 26. MemCpyOptPass

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

-- 27. MemCpyOptPass

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

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

Source:
{ptr, i8, i24, i32} %#1 = { poison, poison, poison, poison }
ptr %dst2 = pointer(non-local, block_id=1, offset=16)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: 0
Block 1 >	size: 77	align: 1	alloc type: 0	alive: true	address: 8
Block 2 >	size: 3	align: 1	alloc type: 0	alive: true	address: 4
Block 3 >	size: 1	align: 1	alloc type: 0	alive: true	address: 2

Target:
ptr %dst2 = pointer(non-local, block_id=1, offset=16)

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

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_ptdpSVjv_F3ph.bc"


------------------- SMT STATS -------------------
Num queries: 57
Num invalid: 0
Num skips:   0
Num trivial: 23 (28.8%)
Num timeout: 1 (1.8%)
Num errors:  2 (3.5%)
Num SAT:     33 (57.9%)
Num UNSAT:   21 (36.8%)
Alive2: Transform doesn't verify; aborting!

stderr:

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
+ /home/nlopes/alive2/build/opt-alive.sh -passes=memcpyopt -S -verify-memoryssa
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll

 

<-- Back