Test source: git
Source: /home/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/memset-memcpy-redundant-memset.ll ---------------------------------------- define void @test(* %src, i64 %src_size, * %dst, i64 %dst_size, i8 %c) { %0: memset * %dst align 1, i8 %c, i64 %dst_size memcpy * %dst align 1, * %src align 1, i64 %src_size ret void } => define void @test(* %src, i64 %src_size, * %dst, i64 %dst_size, i8 %c) { %0: %1 = icmp ule i64 %dst_size, %src_size %2 = sub i64 %dst_size, %src_size %3 = select i1 %1, i64 0, i64 %2 %4 = gep * %dst, 1 x i64 %src_size memset * %4 align 1, i8 %c, i64 %3 memcpy * %dst align 1, * %src align 1, i64 %src_size ret void } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define void @test_different_types_i32_i64(* %dst, * %src, i32 %dst_size, i64 %src_size, i8 %c) { %0: memset * %dst align 1, i8 %c, i32 %dst_size memcpy * %dst align 1, * %src align 1, i64 %src_size ret void } => define void @test_different_types_i32_i64(* %dst, * %src, i32 %dst_size, i64 %src_size, i8 %c) { %0: %1 = zext i32 %dst_size to i64 %2 = icmp ule i64 %1, %src_size %3 = sub i64 %1, %src_size %4 = select i1 %2, i64 0, i64 %3 %5 = gep * %dst, 1 x i64 %src_size memset * %5 align 1, i8 %c, i64 %4 memcpy * %dst align 1, * %src align 1, i64 %src_size ret void } Transformation doesn't verify! ERROR: Source is more defined than target Example: * %dst = pointer(non-local, block_id=1, offset=8732321383563392) * %src = pointer(non-local, block_id=1, offset=0) i32 %dst_size = undef i64 %src_size = #x0000000080000008 (2147483656) i8 %c = poison Source: SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 64 alloc type: 0 Block 1 > size: 4611686018427387904 align: 2 alloc type: 0 Block 2 > align: 4 alloc type: 0 Target: i64 %1 = #x0000000080000009 (2147483657) i1 %2 = #x0 (0) i64 %3 = #xffffffff80020018 (18446744071562199064, -2147352552) i64 %4 = #xffffffff80020018 (18446744071562199064, -2147352552) * %5 = pointer(non-local, block_id=1, offset=8732323531047048) ------------------- SMT STATS ------------------- Num queries: 4 Num invalid: 0 Num skips: 0 Num trivial: 0 (0.0%) Num timeout: 1 (25.0%) Num errors: 0 (0.0%) Num SAT: 3 (75.0%) Num UNSAT: 0 (0.0%)
+ : 'RUN: at line 1' + /home/nlopes/alive2/scripts/opt-alive.sh -basicaa -memcpyopt -S /home/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/memset-memcpy-redundant-memset.ll + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/MemCpyOpt/memset-memcpy-redundant-memset.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/memset-memcpy-redundant-memset.ll
NOTE: This test would pass if undef didn't exist!