Test Failure: Transforms/SROA/alignment.ll

Test source: git

Comments: LLVM bug: memcpy-> load/store; needs 'byte' type

Log:

Source: <stdin>
ERROR: Unsupported instruction:   store volatile i16 0, i16* %cast1, align 2
ERROR: Unsupported instruction:   store volatile double 0.000000e+00, double* %ptr1, align 1
ERROR: Unsupported instruction:   store volatile double 0.000000e+00, double* %ptr1, align 1
ERROR: Unsupported instruction:   store atomic volatile i32 %1, i32* %B.i release, align 4

----------------------------------------
define void @test1(* %a, * %b) {
%entry:
  %alloca = alloca i64 2, align 16
  %gep_a = gep * %a, 2 x i32 0, 1 x i64 0
  %gep_alloca = gep * %alloca, 2 x i32 0, 1 x i64 0
  %gep_b = gep * %b, 2 x i32 0, 1 x i64 0
  store i8 164, * %gep_alloca, align 16
  memcpy * %gep_alloca align 16, * %gep_a align 16, i32 2
  memcpy * %gep_b align 16, * %gep_alloca align 16, i32 2
  ret void
}
=>
define void @test1(* %a, * %b) {
%entry:
  %alloca.sroa.0.0.gep_a.sroa_idx = gep inbounds * %a, 2 x i64 0, 1 x i64 0
  %alloca.sroa.0.0.copyload = load i8, * %alloca.sroa.0.0.gep_a.sroa_idx, align 16
  %alloca.sroa.3.0.gep_a.sroa_idx = gep inbounds * %a, 2 x i64 0, 1 x i64 1
  %alloca.sroa.3.0.copyload = load i8, * %alloca.sroa.3.0.gep_a.sroa_idx, align 1
  %alloca.sroa.0.0.gep_b.sroa_idx = gep inbounds * %b, 2 x i64 0, 1 x i64 0
  store i8 %alloca.sroa.0.0.copyload, * %alloca.sroa.0.0.gep_b.sroa_idx, align 16
  %alloca.sroa.3.0.gep_b.sroa_idx = gep inbounds * %b, 2 x i64 0, 1 x i64 1
  store i8 %alloca.sroa.3.0.copyload, * %alloca.sroa.3.0.gep_b.sroa_idx, align 1
  ret void
}
Transformation doesn't verify!
ERROR: Mismatch in memory

Example:
* %a = pointer(non-local, block_id=1, offset=0)
* %b = pointer(non-local, block_id=2, offset=0)

Source:
* %alloca = pointer(local, block_id=4, offset=0)
* %gep_a = pointer(non-local, block_id=1, offset=0)
* %gep_alloca = pointer(local, block_id=4, offset=0)
* %gep_b = pointer(non-local, block_id=2, offset=0)

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

LOCAL BLOCKS:
Block 4 >	size: 2	align: 16	alloc type: 1

Target:
* %alloca.sroa.0.0.gep_a.sroa_idx = pointer(non-local, block_id=1, offset=0)
i8 %alloca.sroa.0.0.copyload = #x00 (0)
* %alloca.sroa.3.0.gep_a.sroa_idx = pointer(non-local, block_id=1, offset=1)
i8 %alloca.sroa.3.0.copyload = poison
* %alloca.sroa.0.0.gep_b.sroa_idx = pointer(non-local, block_id=2, offset=0)
* %alloca.sroa.3.0.gep_b.sroa_idx = pointer(non-local, block_id=2, offset=1)

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


------------------- SMT STATS -------------------
Num queries: 3
Num invalid: 0
Num skips:   0
Num trivial: 4 (57.1%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     2 (66.7%)
Num UNSAT:   1 (33.3%)

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/llvm/build/bin/FileCheck --allow-unused-prefixes=false /home/nlopes/llvm/llvm/test/Transforms/SROA/alignment.ll
+ /home/nlopes/alive2/build/opt-alive.sh -sroa -S

Alive2: Transform doesn't verify; aborting!
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck --allow-unused-prefixes=false /home/nlopes/llvm/llvm/test/Transforms/SROA/alignment.ll

 

<-- Back