Test source: git
Comments: LLVM bug: memcpy -> load/store
Source: <stdin> ERROR: Unsupported instruction: %B = addrspacecast [8 x i8]* %A to i64 addrspace(1)* ERROR: Unsupported instruction: %B = addrspacecast [256 x i8]* %A to i64 addrspace(1)* ERROR: Unsupported instruction: %B = addrspacecast [256 x i8]* %A to i64 addrspace(1)* ERROR: Unsupported instruction: %fptr.as1 = addrspacecast float* %fptr to float addrspace(1)* ERROR: Unsupported instruction: %cast1 = addrspacecast %opaque* %x to i8 addrspace(1)* ERROR: Unsupported instruction: %cond.in = select i1 undef, i64* %c, i64* %p.0.c ERROR: Unsupported instruction: store volatile i16 42, i16* %a.cast, align 2 ERROR: Unsupported instruction: store volatile i16 42, i16* %a.cast2, align 2 ERROR: Unsupported instruction: store atomic volatile i64 0, i64* %ptr seq_cst, align 8 ---------------------------------------- define i32 @test0() { %entry: %a1 = alloca i64 4, align 4, dead %a2 = alloca i64 4, align 4, dead %a1.i8 = bitcast * %a1 to * start_lifetime * %a1.i8 store i32 0, * %a1, align 4 %v1 = load i32, * %a1, align 4 free * %a1.i8 unconstrained %a2.i8 = bitcast * %a2 to * start_lifetime * %a2.i8 store float 0.000000, * %a2, align 4 %v2 = load float, * %a2, align 4 %v2.int = bitcast float %v2 to i32 %sum1 = add i32 %v1, %v2.int free * %a2.i8 unconstrained ret i32 %sum1 } => define i32 @test0() { %entry: %v2.int = bitcast float 0.000000 to i32 %sum1 = add i32 0, %v2.int ret i32 %sum1 } Transformation seems to be correct! ---------------------------------------- define i32 @test1() { %entry: %X = alloca i64 8, align 8 %Y = gep * %X, 8 x i64 0, 1 x i64 0 store i32 0, * %Y, align 4 %Z = load i32, * %Y, align 4 ret i32 %Z } => define i32 @test1() { %entry: ret i32 0 } Transformation seems to be correct! ---------------------------------------- define i64 @test2(i64 %X) { %entry: %A = alloca i64 8, align 1 %B = bitcast * %A to * store i64 %X, * %B, align 4 br label %L2 %L2: %Z = load i64, * %B, align 4 ret i64 %Z } => define i64 @test2(i64 %X) { %entry: br label %L2 %L2: ret i64 %X } Transformation seems to be correct! ERROR: Unsupported instruction: %A.sroa.0.2.gepB.sroa_cast = addrspacecast i8* %A.sroa.0.2.gepB.sroa_idx to i64 addrspace(1)* ---------------------------------------- define void @test3(* %dst, * align(8) %src) { %entry: %a = alloca i64 300, align 1 %b = gep * %a, 300 x i64 0, 1 x i64 0 memcpy * %b align 1, * align(8) %src align 8, i32 300 %c = gep * %a, 300 x i64 0, 1 x i64 42 store i8 0, * %c, align 1 %overlap.1.i8 = gep * %a, 300 x i64 0, 1 x i64 142 %overlap.2.i8 = gep * %a, 300 x i64 0, 1 x i64 143 %overlap.3.i8 = gep * %a, 300 x i64 0, 1 x i64 144 %overlap.4.i8 = gep * %a, 300 x i64 0, 1 x i64 145 %overlap.5.i8 = gep * %a, 300 x i64 0, 1 x i64 146 %overlap.6.i8 = gep * %a, 300 x i64 0, 1 x i64 147 %overlap.7.i8 = gep * %a, 300 x i64 0, 1 x i64 148 %overlap.8.i8 = gep * %a, 300 x i64 0, 1 x i64 149 %overlap.9.i8 = gep * %a, 300 x i64 0, 1 x i64 150 %overlap.1.i16 = bitcast * %overlap.1.i8 to * %overlap.1.i32 = bitcast * %overlap.1.i8 to * %overlap.1.i64 = bitcast * %overlap.1.i8 to * %overlap.2.i64 = bitcast * %overlap.2.i8 to * %overlap.3.i64 = bitcast * %overlap.3.i8 to * %overlap.4.i64 = bitcast * %overlap.4.i8 to * %overlap.5.i64 = bitcast * %overlap.5.i8 to * %overlap.6.i64 = bitcast * %overlap.6.i8 to * %overlap.7.i64 = bitcast * %overlap.7.i8 to * %overlap.8.i64 = bitcast * %overlap.8.i8 to * %overlap.9.i64 = bitcast * %overlap.9.i8 to * store i8 1, * %overlap.1.i8, align 1 store i16 1, * %overlap.1.i16, align 2 store i32 1, * %overlap.1.i32, align 4 store i64 1, * %overlap.1.i64, align 4 store i64 2, * %overlap.2.i64, align 4 store i64 3, * %overlap.3.i64, align 4 store i64 4, * %overlap.4.i64, align 4 store i64 5, * %overlap.5.i64, align 4 store i64 6, * %overlap.6.i64, align 4 store i64 7, * %overlap.7.i64, align 4 store i64 8, * %overlap.8.i64, align 4 store i64 9, * %overlap.9.i64, align 4 %overlap2.1.0.i8 = gep * %a, 300 x i64 0, 1 x i64 200 %overlap2.1.1.i8 = gep * %a, 300 x i64 0, 1 x i64 201 %overlap2.1.2.i8 = gep * %a, 300 x i64 0, 1 x i64 202 %overlap2.1.3.i8 = gep * %a, 300 x i64 0, 1 x i64 203 %overlap2.2.0.i8 = gep * %a, 300 x i64 0, 1 x i64 208 %overlap2.2.1.i8 = gep * %a, 300 x i64 0, 1 x i64 209 %overlap2.2.2.i8 = gep * %a, 300 x i64 0, 1 x i64 210 %overlap2.2.3.i8 = gep * %a, 300 x i64 0, 1 x i64 211 %overlap2.1.0.i16 = bitcast * %overlap2.1.0.i8 to * %overlap2.1.0.i32 = bitcast * %overlap2.1.0.i8 to * %overlap2.1.1.i32 = bitcast * %overlap2.1.1.i8 to * %overlap2.1.2.i32 = bitcast * %overlap2.1.2.i8 to * %overlap2.1.3.i32 = bitcast * %overlap2.1.3.i8 to * store i8 1, * %overlap2.1.0.i8, align 1 store i16 1, * %overlap2.1.0.i16, align 2 store i32 1, * %overlap2.1.0.i32, align 4 store i32 2, * %overlap2.1.1.i32, align 4 store i32 3, * %overlap2.1.2.i32, align 4 store i32 4, * %overlap2.1.3.i32, align 4 %overlap2.2.0.i32 = bitcast * %overlap2.2.0.i8 to * %overlap2.2.1.i16 = bitcast * %overlap2.2.1.i8 to * %overlap2.2.1.i32 = bitcast * %overlap2.2.1.i8 to * %overlap2.2.2.i32 = bitcast * %overlap2.2.2.i8 to * %overlap2.2.3.i32 = bitcast * %overlap2.2.3.i8 to * store i32 1, * %overlap2.2.0.i32, align 4 store i8 1, * %overlap2.2.1.i8, align 1 store i16 1, * %overlap2.2.1.i16, align 2 store i32 1, * %overlap2.2.1.i32, align 4 store i32 3, * %overlap2.2.2.i32, align 4 store i32 4, * %overlap2.2.3.i32, align 4 %overlap2.prefix = gep * %overlap2.1.1.i8, 1 x i64 -4 memcpy * %overlap2.prefix align 1, * align(8) %src align 1, i32 8 memset * %overlap2.1.2.i8 align 1, i8 42, i32 8 memcpy * %overlap2.2.1.i8 align 1, * align(8) %src align 1, i32 5 memcpy * %overlap2.2.2.i8 align 1, * align(8) %src align 1, i32 8 memcpy * %dst align 1, * %b align 1, i32 300 ret void } => define void @test3(* %dst, * align(8) %src) { %entry: %a.sroa.0 = alloca i64 42, align 1 %a.sroa.3 = alloca i64 99, align 1 %a.sroa.34 = alloca i64 16, align 1 %a.sroa.15 = alloca i64 42, align 1 %a.sroa.16 = alloca i64 7, align 1 %a.sroa.239 = alloca i64 7, align 1 %a.sroa.31 = alloca i64 85, align 1 %a.sroa.0.0.b.sroa_idx = gep inbounds * %a.sroa.0, 42 x i64 0, 1 x i64 0 memcpy * %a.sroa.0.0.b.sroa_idx align 1, * align(8) %src align 8, i32 42 %a.sroa.2.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 42 %a.sroa.2.0.copyload = load i8, * %a.sroa.2.0.src.sroa_raw_idx, align 2 %a.sroa.3.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 43 %a.sroa.3.0.b.sroa_idx = gep inbounds * %a.sroa.3, 99 x i64 0, 1 x i64 0 memcpy * %a.sroa.3.0.b.sroa_idx align 1, * %a.sroa.3.0.src.sroa_raw_idx align 1, i32 99 %a.sroa.34.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 142 %a.sroa.34.0.b.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 0 memcpy * %a.sroa.34.0.b.sroa_idx align 1, * %a.sroa.34.0.src.sroa_raw_idx align 2, i32 16 %a.sroa.15.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 158 %a.sroa.15.0.b.sroa_idx = gep inbounds * %a.sroa.15, 42 x i64 0, 1 x i64 0 memcpy * %a.sroa.15.0.b.sroa_idx align 1, * %a.sroa.15.0.src.sroa_raw_idx align 2, i32 42 %a.sroa.16.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 200 %a.sroa.16.0.b.sroa_idx = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.16.0.b.sroa_idx align 1, * %a.sroa.16.0.src.sroa_raw_idx align 8, i32 7 %a.sroa.23.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 207 %a.sroa.23.0.copyload = load i8, * %a.sroa.23.0.src.sroa_raw_idx, align 1 %a.sroa.239.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 208 %a.sroa.239.0.b.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.239.0.b.sroa_idx align 1, * %a.sroa.239.0.src.sroa_raw_idx align 8, i32 7 %a.sroa.31.0.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 215 %a.sroa.31.0.b.sroa_idx = gep inbounds * %a.sroa.31, 85 x i64 0, 1 x i64 0 memcpy * %a.sroa.31.0.b.sroa_idx align 1, * %a.sroa.31.0.src.sroa_raw_idx align 1, i32 85 %a.sroa.34.0.overlap.1.i8.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 0 store i8 1, * %a.sroa.34.0.overlap.1.i8.sroa_idx, align 1 %a.sroa.34.0.overlap.1.i16.sroa_cast = bitcast * %a.sroa.34 to * store i16 1, * %a.sroa.34.0.overlap.1.i16.sroa_cast, align 1 %a.sroa.34.0.overlap.1.i32.sroa_cast = bitcast * %a.sroa.34 to * store i32 1, * %a.sroa.34.0.overlap.1.i32.sroa_cast, align 1 %a.sroa.34.0.overlap.1.i64.sroa_cast = bitcast * %a.sroa.34 to * store i64 1, * %a.sroa.34.0.overlap.1.i64.sroa_cast, align 1 %a.sroa.34.1.overlap.2.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 1 %a.sroa.34.1.overlap.2.i64.sroa_cast = bitcast * %a.sroa.34.1.overlap.2.i64.sroa_idx to * store i64 2, * %a.sroa.34.1.overlap.2.i64.sroa_cast, align 1 %a.sroa.34.2.overlap.3.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 2 %a.sroa.34.2.overlap.3.i64.sroa_cast = bitcast * %a.sroa.34.2.overlap.3.i64.sroa_idx to * store i64 3, * %a.sroa.34.2.overlap.3.i64.sroa_cast, align 1 %a.sroa.34.3.overlap.4.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 3 %a.sroa.34.3.overlap.4.i64.sroa_cast = bitcast * %a.sroa.34.3.overlap.4.i64.sroa_idx to * store i64 4, * %a.sroa.34.3.overlap.4.i64.sroa_cast, align 1 %a.sroa.34.4.overlap.5.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 4 %a.sroa.34.4.overlap.5.i64.sroa_cast = bitcast * %a.sroa.34.4.overlap.5.i64.sroa_idx to * store i64 5, * %a.sroa.34.4.overlap.5.i64.sroa_cast, align 1 %a.sroa.34.5.overlap.6.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 5 %a.sroa.34.5.overlap.6.i64.sroa_cast = bitcast * %a.sroa.34.5.overlap.6.i64.sroa_idx to * store i64 6, * %a.sroa.34.5.overlap.6.i64.sroa_cast, align 1 %a.sroa.34.6.overlap.7.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 6 %a.sroa.34.6.overlap.7.i64.sroa_cast = bitcast * %a.sroa.34.6.overlap.7.i64.sroa_idx to * store i64 7, * %a.sroa.34.6.overlap.7.i64.sroa_cast, align 1 %a.sroa.34.7.overlap.8.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 7 %a.sroa.34.7.overlap.8.i64.sroa_cast = bitcast * %a.sroa.34.7.overlap.8.i64.sroa_idx to * store i64 8, * %a.sroa.34.7.overlap.8.i64.sroa_cast, align 1 %a.sroa.34.8.overlap.9.i64.sroa_idx = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 8 %a.sroa.34.8.overlap.9.i64.sroa_cast = bitcast * %a.sroa.34.8.overlap.9.i64.sroa_idx to * store i64 9, * %a.sroa.34.8.overlap.9.i64.sroa_cast, align 1 %a.sroa.16.0.overlap2.1.0.i8.sroa_idx = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 0 store i8 1, * %a.sroa.16.0.overlap2.1.0.i8.sroa_idx, align 1 %a.sroa.16.0.overlap2.1.0.i16.sroa_cast = bitcast * %a.sroa.16 to * store i16 1, * %a.sroa.16.0.overlap2.1.0.i16.sroa_cast, align 1 %a.sroa.16.0.overlap2.1.0.i32.sroa_cast = bitcast * %a.sroa.16 to * store i32 1, * %a.sroa.16.0.overlap2.1.0.i32.sroa_cast, align 1 %a.sroa.16.1.overlap2.1.1.i32.sroa_idx = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 1 %a.sroa.16.1.overlap2.1.1.i32.sroa_cast = bitcast * %a.sroa.16.1.overlap2.1.1.i32.sroa_idx to * store i32 2, * %a.sroa.16.1.overlap2.1.1.i32.sroa_cast, align 1 %a.sroa.16.2.overlap2.1.2.i32.sroa_idx = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 2 %a.sroa.16.2.overlap2.1.2.i32.sroa_cast = bitcast * %a.sroa.16.2.overlap2.1.2.i32.sroa_idx to * store i32 3, * %a.sroa.16.2.overlap2.1.2.i32.sroa_cast, align 1 %a.sroa.16.3.overlap2.1.3.i32.sroa_idx = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 3 %a.sroa.16.3.overlap2.1.3.i32.sroa_cast = bitcast * %a.sroa.16.3.overlap2.1.3.i32.sroa_idx to * store i32 4, * %a.sroa.16.3.overlap2.1.3.i32.sroa_cast, align 1 %a.sroa.239.0.overlap2.2.0.i32.sroa_cast = bitcast * %a.sroa.239 to * store i32 1, * %a.sroa.239.0.overlap2.2.0.i32.sroa_cast, align 1 %a.sroa.239.1.overlap2.2.1.i8.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 1 store i8 1, * %a.sroa.239.1.overlap2.2.1.i8.sroa_idx, align 1 %a.sroa.239.1.overlap2.2.1.i16.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 1 %a.sroa.239.1.overlap2.2.1.i16.sroa_cast = bitcast * %a.sroa.239.1.overlap2.2.1.i16.sroa_idx to * store i16 1, * %a.sroa.239.1.overlap2.2.1.i16.sroa_cast, align 1 %a.sroa.239.1.overlap2.2.1.i32.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 1 %a.sroa.239.1.overlap2.2.1.i32.sroa_cast = bitcast * %a.sroa.239.1.overlap2.2.1.i32.sroa_idx to * store i32 1, * %a.sroa.239.1.overlap2.2.1.i32.sroa_cast, align 1 %a.sroa.239.2.overlap2.2.2.i32.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 2 %a.sroa.239.2.overlap2.2.2.i32.sroa_cast = bitcast * %a.sroa.239.2.overlap2.2.2.i32.sroa_idx to * store i32 3, * %a.sroa.239.2.overlap2.2.2.i32.sroa_cast, align 1 %a.sroa.239.3.overlap2.2.3.i32.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 3 %a.sroa.239.3.overlap2.2.3.i32.sroa_cast = bitcast * %a.sroa.239.3.overlap2.2.3.i32.sroa_idx to * store i32 4, * %a.sroa.239.3.overlap2.2.3.i32.sroa_cast, align 1 %a.sroa.15.197.overlap2.prefix.sroa_idx = gep inbounds * %a.sroa.15, 42 x i64 0, 1 x i64 39 memcpy * %a.sroa.15.197.overlap2.prefix.sroa_idx align 1, * align(8) %src align 1, i32 3 %a.sroa.16.197.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 3 %a.sroa.16.197.overlap2.prefix.sroa_idx = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.16.197.overlap2.prefix.sroa_idx align 1, * %a.sroa.16.197.src.sroa_raw_idx align 1, i32 5 %a.sroa.16.2.overlap2.1.2.i8.sroa_idx = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 2 memset * %a.sroa.16.2.overlap2.1.2.i8.sroa_idx align 1, i8 42, i32 5 %a.sroa.239.0.overlap2.1.2.i8.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 0 memset * %a.sroa.239.0.overlap2.1.2.i8.sroa_idx align 1, i8 42, i32 2 %a.sroa.239.209.overlap2.2.1.i8.sroa_idx11 = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 1 memcpy * %a.sroa.239.209.overlap2.2.1.i8.sroa_idx11 align 1, * align(8) %src align 1, i32 5 %a.sroa.239.210.overlap2.2.2.i8.sroa_idx = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 2 memcpy * %a.sroa.239.210.overlap2.2.2.i8.sroa_idx align 1, * align(8) %src align 1, i32 5 %a.sroa.31.210.src.sroa_raw_idx = gep inbounds * align(8) %src, 1 x i64 5 %a.sroa.31.210.overlap2.2.2.i8.sroa_idx = gep inbounds * %a.sroa.31, 85 x i64 0, 1 x i64 0 memcpy * %a.sroa.31.210.overlap2.2.2.i8.sroa_idx align 1, * %a.sroa.31.210.src.sroa_raw_idx align 1, i32 3 %a.sroa.0.0.b.sroa_idx1 = gep inbounds * %a.sroa.0, 42 x i64 0, 1 x i64 0 memcpy * %dst align 1, * %a.sroa.0.0.b.sroa_idx1 align 1, i32 42 %a.sroa.2.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 42 store i8 0, * %a.sroa.2.0.dst.sroa_raw_idx, align 1 %a.sroa.3.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 43 %a.sroa.3.0.b.sroa_idx3 = gep inbounds * %a.sroa.3, 99 x i64 0, 1 x i64 0 memcpy * %a.sroa.3.0.dst.sroa_raw_idx align 1, * %a.sroa.3.0.b.sroa_idx3 align 1, i32 99 %a.sroa.34.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 142 %a.sroa.34.0.b.sroa_idx5 = gep inbounds * %a.sroa.34, 16 x i64 0, 1 x i64 0 memcpy * %a.sroa.34.0.dst.sroa_raw_idx align 1, * %a.sroa.34.0.b.sroa_idx5 align 1, i32 16 %a.sroa.15.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 158 %a.sroa.15.0.b.sroa_idx6 = gep inbounds * %a.sroa.15, 42 x i64 0, 1 x i64 0 memcpy * %a.sroa.15.0.dst.sroa_raw_idx align 1, * %a.sroa.15.0.b.sroa_idx6 align 1, i32 42 %a.sroa.16.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 200 %a.sroa.16.0.b.sroa_idx7 = gep inbounds * %a.sroa.16, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.16.0.dst.sroa_raw_idx align 1, * %a.sroa.16.0.b.sroa_idx7 align 1, i32 7 %a.sroa.23.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 207 store i8 42, * %a.sroa.23.0.dst.sroa_raw_idx, align 1 %a.sroa.239.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 208 %a.sroa.239.0.b.sroa_idx10 = gep inbounds * %a.sroa.239, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.239.0.dst.sroa_raw_idx align 1, * %a.sroa.239.0.b.sroa_idx10 align 1, i32 7 %a.sroa.31.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 215 %a.sroa.31.0.b.sroa_idx12 = gep inbounds * %a.sroa.31, 85 x i64 0, 1 x i64 0 memcpy * %a.sroa.31.0.dst.sroa_raw_idx align 1, * %a.sroa.31.0.b.sroa_idx12 align 1, i32 85 ret void } Transformation seems to be correct! ---------------------------------------- define void @test4(* %dst, * %src) { %entry: %a = alloca i64 100, align 1 %b = gep * %a, 100 x i64 0, 1 x i64 0 memcpy * %b align 1, * %src align 1, i32 100 %a.src.1 = gep * %a, 100 x i64 0, 1 x i64 20 %a.dst.1 = gep * %a, 100 x i64 0, 1 x i64 40 memcpy * %a.dst.1 align 1, * %a.src.1 align 1, i32 10 %c = gep * %a, 100 x i64 0, 1 x i64 42 store i8 0, * %c, align 1 %a.src.2 = gep * %a, 100 x i64 0, 1 x i64 50 memmove * %a.dst.1 align 1, * %a.src.2 align 1, i32 10 memcpy * %dst align 1, * %b align 1, i32 100 ret void } => define void @test4(* %dst, * %src) { %entry: %a.sroa.0 = alloca i64 20, align 1 %a.sroa.2.sroa.4 = alloca i64 7, align 1 %a.sroa.3 = alloca i64 10, align 1 %a.sroa.34.sroa.5 = alloca i64 7, align 1 %a.sroa.6.sroa.4 = alloca i64 7, align 1 %a.sroa.7 = alloca i64 40, align 1 %a.sroa.0.0.b.sroa_idx = gep inbounds * %a.sroa.0, 20 x i64 0, 1 x i64 0 memcpy * %a.sroa.0.0.b.sroa_idx align 1, * %src align 1, i32 20 %a.sroa.2.sroa.0.0.a.sroa.2.0.src.sroa_raw_idx.sroa_idx = gep inbounds * %src, 1 x i64 20 %a.sroa.2.sroa.0.0.a.sroa.2.0.src.sroa_raw_idx.sroa_cast = bitcast * %a.sroa.2.sroa.0.0.a.sroa.2.0.src.sroa_raw_idx.sroa_idx to * %a.sroa.2.sroa.0.0.copyload = load i16, * %a.sroa.2.sroa.0.0.a.sroa.2.0.src.sroa_raw_idx.sroa_cast, align 1 %a.sroa.2.sroa.3.0.a.sroa.2.0.src.sroa_raw_idx.sroa_raw_idx = gep inbounds * %src, 1 x i64 22 %a.sroa.2.sroa.3.0.copyload = load i8, * %a.sroa.2.sroa.3.0.a.sroa.2.0.src.sroa_raw_idx.sroa_raw_idx, align 1 %a.sroa.2.sroa.4.0.a.sroa.2.0.src.sroa_raw_idx.sroa_raw_idx = gep inbounds * %src, 1 x i64 23 %a.sroa.2.sroa.4.0.b.sroa_idx = gep inbounds * %a.sroa.2.sroa.4, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.2.sroa.4.0.b.sroa_idx align 1, * %a.sroa.2.sroa.4.0.a.sroa.2.0.src.sroa_raw_idx.sroa_raw_idx align 1, i32 7 %a.sroa.3.0.src.sroa_raw_idx = gep inbounds * %src, 1 x i64 30 %a.sroa.3.0.b.sroa_idx = gep inbounds * %a.sroa.3, 10 x i64 0, 1 x i64 0 memcpy * %a.sroa.3.0.b.sroa_idx align 1, * %a.sroa.3.0.src.sroa_raw_idx align 1, i32 10 %a.sroa.34.sroa.0.0.a.sroa.34.0.src.sroa_raw_idx.sroa_idx = gep inbounds * %src, 1 x i64 40 %a.sroa.34.sroa.0.0.a.sroa.34.0.src.sroa_raw_idx.sroa_cast = bitcast * %a.sroa.34.sroa.0.0.a.sroa.34.0.src.sroa_raw_idx.sroa_idx to * %a.sroa.34.sroa.0.0.copyload = load i16, * %a.sroa.34.sroa.0.0.a.sroa.34.0.src.sroa_raw_idx.sroa_cast, align 1 %a.sroa.34.sroa.4.0.a.sroa.34.0.src.sroa_raw_idx.sroa_raw_idx = gep inbounds * %src, 1 x i64 42 %a.sroa.34.sroa.4.0.copyload = load i8, * %a.sroa.34.sroa.4.0.a.sroa.34.0.src.sroa_raw_idx.sroa_raw_idx, align 1 %a.sroa.34.sroa.5.0.a.sroa.34.0.src.sroa_raw_idx.sroa_raw_idx = gep inbounds * %src, 1 x i64 43 %a.sroa.34.sroa.5.0.b.sroa_idx = gep inbounds * %a.sroa.34.sroa.5, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.34.sroa.5.0.b.sroa_idx align 1, * %a.sroa.34.sroa.5.0.a.sroa.34.0.src.sroa_raw_idx.sroa_raw_idx align 1, i32 7 %a.sroa.6.sroa.0.0.a.sroa.6.0.src.sroa_raw_idx.sroa_idx = gep inbounds * %src, 1 x i64 50 %a.sroa.6.sroa.0.0.a.sroa.6.0.src.sroa_raw_idx.sroa_cast = bitcast * %a.sroa.6.sroa.0.0.a.sroa.6.0.src.sroa_raw_idx.sroa_idx to * %a.sroa.6.sroa.0.0.copyload = load i16, * %a.sroa.6.sroa.0.0.a.sroa.6.0.src.sroa_raw_idx.sroa_cast, align 1 %a.sroa.6.sroa.3.0.a.sroa.6.0.src.sroa_raw_idx.sroa_raw_idx = gep inbounds * %src, 1 x i64 52 %a.sroa.6.sroa.3.0.copyload = load i8, * %a.sroa.6.sroa.3.0.a.sroa.6.0.src.sroa_raw_idx.sroa_raw_idx, align 1 %a.sroa.6.sroa.4.0.a.sroa.6.0.src.sroa_raw_idx.sroa_raw_idx = gep inbounds * %src, 1 x i64 53 %a.sroa.6.sroa.4.0.b.sroa_idx = gep inbounds * %a.sroa.6.sroa.4, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.6.sroa.4.0.b.sroa_idx align 1, * %a.sroa.6.sroa.4.0.a.sroa.6.0.src.sroa_raw_idx.sroa_raw_idx align 1, i32 7 %a.sroa.7.0.src.sroa_raw_idx = gep inbounds * %src, 1 x i64 60 %a.sroa.7.0.b.sroa_idx = gep inbounds * %a.sroa.7, 40 x i64 0, 1 x i64 0 memcpy * %a.sroa.7.0.b.sroa_idx align 1, * %a.sroa.7.0.src.sroa_raw_idx align 1, i32 40 %a.sroa.2.sroa.4.3.a.sroa.34.sroa.5.0.a.dst.1.sroa_idx.sroa_idx = gep inbounds * %a.sroa.34.sroa.5, 7 x i64 0, 1 x i64 0 %a.sroa.2.sroa.4.3.a.src.1.sroa_idx = gep inbounds * %a.sroa.2.sroa.4, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.2.sroa.4.3.a.sroa.34.sroa.5.0.a.dst.1.sroa_idx.sroa_idx align 1, * %a.sroa.2.sroa.4.3.a.src.1.sroa_idx align 1, i32 7 %a.sroa.6.sroa.4.3.a.sroa.34.sroa.5.0.a.dst.1.sroa_idx16.sroa_idx = gep inbounds * %a.sroa.34.sroa.5, 7 x i64 0, 1 x i64 0 %a.sroa.6.sroa.4.3.a.src.2.sroa_idx = gep inbounds * %a.sroa.6.sroa.4, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.6.sroa.4.3.a.sroa.34.sroa.5.0.a.dst.1.sroa_idx16.sroa_idx align 1, * %a.sroa.6.sroa.4.3.a.src.2.sroa_idx align 1, i32 7 %a.sroa.0.0.b.sroa_idx1 = gep inbounds * %a.sroa.0, 20 x i64 0, 1 x i64 0 memcpy * %dst align 1, * %a.sroa.0.0.b.sroa_idx1 align 1, i32 20 %a.sroa.2.sroa.0.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_idx = gep inbounds * %dst, 1 x i64 20 %a.sroa.2.sroa.0.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_cast = bitcast * %a.sroa.2.sroa.0.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_idx to * store i16 %a.sroa.2.sroa.0.0.copyload, * %a.sroa.2.sroa.0.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_cast, align 1 %a.sroa.2.sroa.3.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_raw_idx = gep inbounds * %dst, 1 x i64 22 store i8 %a.sroa.2.sroa.3.0.copyload, * %a.sroa.2.sroa.3.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_raw_idx, align 1 %a.sroa.2.sroa.4.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_raw_idx = gep inbounds * %dst, 1 x i64 23 %a.sroa.2.sroa.4.0.b.sroa_idx22 = gep inbounds * %a.sroa.2.sroa.4, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.2.sroa.4.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_raw_idx align 1, * %a.sroa.2.sroa.4.0.b.sroa_idx22 align 1, i32 7 %a.sroa.3.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 30 %a.sroa.3.0.b.sroa_idx3 = gep inbounds * %a.sroa.3, 10 x i64 0, 1 x i64 0 memcpy * %a.sroa.3.0.dst.sroa_raw_idx align 1, * %a.sroa.3.0.b.sroa_idx3 align 1, i32 10 %a.sroa.34.sroa.0.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_idx = gep inbounds * %dst, 1 x i64 40 %a.sroa.34.sroa.0.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_cast = bitcast * %a.sroa.34.sroa.0.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_idx to * store i16 %a.sroa.6.sroa.0.0.copyload, * %a.sroa.34.sroa.0.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_cast, align 1 %a.sroa.34.sroa.4.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_raw_idx = gep inbounds * %dst, 1 x i64 42 store i8 %a.sroa.6.sroa.3.0.copyload, * %a.sroa.34.sroa.4.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_raw_idx, align 1 %a.sroa.34.sroa.5.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_raw_idx = gep inbounds * %dst, 1 x i64 43 %a.sroa.34.sroa.5.0.b.sroa_idx15 = gep inbounds * %a.sroa.34.sroa.5, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.34.sroa.5.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_raw_idx align 1, * %a.sroa.34.sroa.5.0.b.sroa_idx15 align 1, i32 7 %a.sroa.6.sroa.0.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_idx = gep inbounds * %dst, 1 x i64 50 %a.sroa.6.sroa.0.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_cast = bitcast * %a.sroa.6.sroa.0.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_idx to * store i16 %a.sroa.6.sroa.0.0.copyload, * %a.sroa.6.sroa.0.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_cast, align 1 %a.sroa.6.sroa.3.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_raw_idx = gep inbounds * %dst, 1 x i64 52 store i8 %a.sroa.6.sroa.3.0.copyload, * %a.sroa.6.sroa.3.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_raw_idx, align 1 %a.sroa.6.sroa.4.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_raw_idx = gep inbounds * %dst, 1 x i64 53 %a.sroa.6.sroa.4.0.b.sroa_idx19 = gep inbounds * %a.sroa.6.sroa.4, 7 x i64 0, 1 x i64 0 memcpy * %a.sroa.6.sroa.4.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_raw_idx align 1, * %a.sroa.6.sroa.4.0.b.sroa_idx19 align 1, i32 7 %a.sroa.7.0.dst.sroa_raw_idx = gep inbounds * %dst, 1 x i64 60 %a.sroa.7.0.b.sroa_idx8 = gep inbounds * %a.sroa.7, 40 x i64 0, 1 x i64 0 memcpy * %a.sroa.7.0.dst.sroa_raw_idx align 1, * %a.sroa.7.0.b.sroa_idx8 align 1, i32 40 ret void } Transformation doesn't verify! ERROR: Mismatch in memory Example: * %dst = pointer(non-local, block_id=1, offset=0) * %src = pointer(non-local, block_id=1, offset=6) Source: * %a = pointer(local, block_id=8, offset=0) * %b = pointer(local, block_id=8, offset=0) * %a.src.1 = pointer(local, block_id=8, offset=20) * %a.dst.1 = pointer(local, block_id=8, offset=40) * %c = pointer(local, block_id=8, offset=42) * %a.src.2 = pointer(local, block_id=8, offset=50) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 Block 1 > size: 2052 align: 2 alloc type: 0 Block 2 > align: 2 alloc type: 0 LOCAL BLOCKS: Block 8 > size: 100 align: 1 alloc type: 1 Target: * %a.sroa.0 = pointer(local, block_id=8, offset=0) * %a.sroa.2.sroa.4 = pointer(local, block_id=9, offset=0) * %a.sroa.3 = pointer(local, block_id=10, offset=0) * %a.sroa.34.sroa.5 = pointer(local, block_id=11, offset=0) * %a.sroa.6.sroa.4 = pointer(local, block_id=12, offset=0) * %a.sroa.7 = pointer(local, block_id=13, offset=0) * %a.sroa.0.0.b.sroa_idx = pointer(local, block_id=8, offset=0) * %a.sroa.2.sroa.0.0.a.sroa.2.0.src.sroa_raw_idx.sroa_idx = pointer(non-local, block_id=1, offset=26) * %a.sroa.2.sroa.0.0.a.sroa.2.0.src.sroa_raw_idx.sroa_cast = pointer(non-local, block_id=1, offset=26) i16 %a.sroa.2.sroa.0.0.copyload = poison * %a.sroa.2.sroa.3.0.a.sroa.2.0.src.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=28) i8 %a.sroa.2.sroa.3.0.copyload = poison * %a.sroa.2.sroa.4.0.a.sroa.2.0.src.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=29) * %a.sroa.2.sroa.4.0.b.sroa_idx = pointer(local, block_id=9, offset=0) * %a.sroa.3.0.src.sroa_raw_idx = pointer(non-local, block_id=1, offset=36) * %a.sroa.3.0.b.sroa_idx = pointer(local, block_id=10, offset=0) * %a.sroa.34.sroa.0.0.a.sroa.34.0.src.sroa_raw_idx.sroa_idx = pointer(non-local, block_id=1, offset=46) * %a.sroa.34.sroa.0.0.a.sroa.34.0.src.sroa_raw_idx.sroa_cast = pointer(non-local, block_id=1, offset=46) i16 %a.sroa.34.sroa.0.0.copyload = poison * %a.sroa.34.sroa.4.0.a.sroa.34.0.src.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=48) i8 %a.sroa.34.sroa.4.0.copyload = poison * %a.sroa.34.sroa.5.0.a.sroa.34.0.src.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=49) * %a.sroa.34.sroa.5.0.b.sroa_idx = pointer(local, block_id=11, offset=0) * %a.sroa.6.sroa.0.0.a.sroa.6.0.src.sroa_raw_idx.sroa_idx = pointer(non-local, block_id=1, offset=56) * %a.sroa.6.sroa.0.0.a.sroa.6.0.src.sroa_raw_idx.sroa_cast = pointer(non-local, block_id=1, offset=56) i16 %a.sroa.6.sroa.0.0.copyload = poison * %a.sroa.6.sroa.3.0.a.sroa.6.0.src.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=58) i8 %a.sroa.6.sroa.3.0.copyload = poison * %a.sroa.6.sroa.4.0.a.sroa.6.0.src.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=59) * %a.sroa.6.sroa.4.0.b.sroa_idx = pointer(local, block_id=12, offset=0) * %a.sroa.7.0.src.sroa_raw_idx = pointer(non-local, block_id=1, offset=66) * %a.sroa.7.0.b.sroa_idx = pointer(local, block_id=13, offset=0) * %a.sroa.2.sroa.4.3.a.sroa.34.sroa.5.0.a.dst.1.sroa_idx.sroa_idx = pointer(local, block_id=11, offset=0) * %a.sroa.2.sroa.4.3.a.src.1.sroa_idx = pointer(local, block_id=9, offset=0) * %a.sroa.6.sroa.4.3.a.sroa.34.sroa.5.0.a.dst.1.sroa_idx16.sroa_idx = pointer(local, block_id=11, offset=0) * %a.sroa.6.sroa.4.3.a.src.2.sroa_idx = pointer(local, block_id=12, offset=0) * %a.sroa.0.0.b.sroa_idx1 = pointer(local, block_id=8, offset=0) * %a.sroa.2.sroa.0.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_idx = pointer(non-local, block_id=1, offset=20) * %a.sroa.2.sroa.0.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_cast = pointer(non-local, block_id=1, offset=20) * %a.sroa.2.sroa.3.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=22) * %a.sroa.2.sroa.4.0.a.sroa.2.0.dst.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=23) * %a.sroa.2.sroa.4.0.b.sroa_idx22 = pointer(local, block_id=9, offset=0) * %a.sroa.3.0.dst.sroa_raw_idx = pointer(non-local, block_id=1, offset=30) * %a.sroa.3.0.b.sroa_idx3 = pointer(local, block_id=10, offset=0) * %a.sroa.34.sroa.0.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_idx = pointer(non-local, block_id=1, offset=40) * %a.sroa.34.sroa.0.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_cast = pointer(non-local, block_id=1, offset=40) * %a.sroa.34.sroa.4.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=42) * %a.sroa.34.sroa.5.0.a.sroa.34.0.dst.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=43) * %a.sroa.34.sroa.5.0.b.sroa_idx15 = pointer(local, block_id=11, offset=0) * %a.sroa.6.sroa.0.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_idx = pointer(non-local, block_id=1, offset=50) * %a.sroa.6.sroa.0.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_cast = pointer(non-local, block_id=1, offset=50) * %a.sroa.6.sroa.3.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=52) * %a.sroa.6.sroa.4.0.a.sroa.6.0.dst.sroa_raw_idx.sroa_raw_idx = pointer(non-local, block_id=1, offset=53) * %a.sroa.6.sroa.4.0.b.sroa_idx19 = pointer(local, block_id=12, offset=0) * %a.sroa.7.0.dst.sroa_raw_idx = pointer(non-local, block_id=1, offset=60) * %a.sroa.7.0.b.sroa_idx8 = pointer(local, block_id=13, offset=0) TARGET MEMORY STATE =================== LOCAL BLOCKS: Block 8 > size: 20 align: 1 alloc type: 1 Block 9 > size: 7 align: 1 alloc type: 1 Block 10 > size: 10 align: 1 alloc type: 1 Block 11 > size: 7 align: 1 alloc type: 1 Block 12 > size: 7 align: 1 alloc type: 1 Block 13 > size: 40 align: 1 alloc type: 1 Mismatch in pointer(non-local, block_id=1, offset=42) Source value: pointer(non-local, block_id=2, offset=0), byte offset=0 Target value: poison ------------------- SMT STATS ------------------- Num queries: 7 Num invalid: 0 Num skips: 0 Num trivial: 86 (92.5%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 6 (85.7%) Num UNSAT: 1 (14.3%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -sroa -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll