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 seems to be correct!

-- 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) / Address=#x08
ptr %dst = pointer(non-local, block_id=1, offset=0) / Address=#x08

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

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

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

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

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


------------------- SMT STATS -------------------
Num queries: 60
Num invalid: 0
Num skips:   0
Num trivial: 23 (27.7%)
Num timeout: 0 (0.0%)
Num errors:  2 (3.3%)
Num SAT:     36 (60.0%)
Num UNSAT:   22 (36.7%)
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