Test source: git
Comments: LLVM PR52971
Source: <stdin> ---------------------------------------- define i32 @test1(<4 x i32> %x, <4 x i32> %y) { %entry: %a = alloca i64 32, align 16 %a.x = gep inbounds * %a, 32 x i64 0, 16 x i64 0 store <4 x i32> %x, * %a.x, align 16 %a.y = gep inbounds * %a, 32 x i64 0, 16 x i64 1 store <4 x i32> %y, * %a.y, align 16 %a.tmp1 = gep inbounds * %a, 32 x i64 0, 16 x i64 0, 4 x i64 2 %tmp1 = load i32, * %a.tmp1, align 4 %a.tmp2 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 3 %tmp2 = load i32, * %a.tmp2, align 4 %a.tmp3 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 0 %tmp3 = load i32, * %a.tmp3, align 4 %tmp4 = add i32 %tmp1, %tmp2 %tmp5 = add i32 %tmp3, %tmp4 ret i32 %tmp5 } => define i32 @test1(<4 x i32> %x, <4 x i32> %y) { %entry: %a.sroa.0.8.vec.extract = extractelement <4 x i32> %x, i32 2 %a.sroa.2.28.vec.extract = extractelement <4 x i32> %y, i32 3 %a.sroa.2.16.vec.extract = extractelement <4 x i32> %y, i32 0 %tmp4 = add i32 %a.sroa.0.8.vec.extract, %a.sroa.2.28.vec.extract %tmp5 = add i32 %a.sroa.2.16.vec.extract, %tmp4 ret i32 %tmp5 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @test2(<4 x i32> %x, <4 x i32> %y) { %entry: %a = alloca i64 32, align 16 %a.x = gep inbounds * %a, 32 x i64 0, 16 x i64 0 store <4 x i32> %x, * %a.x, align 16 %a.y = gep inbounds * %a, 32 x i64 0, 16 x i64 1 store <4 x i32> %y, * %a.y, align 16 %a.tmp1 = gep inbounds * %a, 32 x i64 0, 16 x i64 0, 4 x i64 2 %tmp1 = load i32, * %a.tmp1, align 4 %a.tmp2 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 3 %tmp2 = load i32, * %a.tmp2, align 4 %a.tmp3 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 0 %a.tmp3.cast = bitcast * %a.tmp3 to * %tmp3.vec = load <2 x i32>, * %a.tmp3.cast, align 8 %tmp3 = extractelement <2 x i32> %tmp3.vec, i32 0 %tmp4 = add i32 %tmp1, %tmp2 %tmp5 = add i32 %tmp3, %tmp4 ret i32 %tmp5 } => define i32 @test2(<4 x i32> %x, <4 x i32> %y) { %entry: %a.sroa.0.8.vec.extract = extractelement <4 x i32> %x, i32 2 %a.sroa.2.28.vec.extract = extractelement <4 x i32> %y, i32 3 %a.sroa.2.16.vec.extract = shufflevector <4 x i32> %y, <4 x i32> poison, 0, 1 %tmp3 = extractelement <2 x i32> %a.sroa.2.16.vec.extract, i32 0 %tmp4 = add i32 %a.sroa.0.8.vec.extract, %a.sroa.2.28.vec.extract %tmp5 = add i32 %tmp3, %tmp4 ret i32 %tmp5 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @test3(<4 x i32> %x, <4 x i32> %y) { %entry: %a = alloca i64 32, align 16 %a.x = gep inbounds * %a, 32 x i64 0, 16 x i64 0 store <4 x i32> %x, * %a.x, align 16 %a.y = gep inbounds * %a, 32 x i64 0, 16 x i64 1 store <4 x i32> %y, * %a.y, align 16 %a.y.cast = bitcast * %a.y to * memset * %a.y.cast align 1, i8 0, i32 16 %a.tmp1 = gep inbounds * %a, 32 x i64 0, 16 x i64 0, 4 x i64 2 %a.tmp1.cast = bitcast * %a.tmp1 to * memset * %a.tmp1.cast align 1, i8 255, i32 4 %tmp1 = load i32, * %a.tmp1, align 4 %a.tmp2 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 3 %tmp2 = load i32, * %a.tmp2, align 4 %a.tmp3 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 0 %tmp3 = load i32, * %a.tmp3, align 4 %tmp4 = add i32 %tmp1, %tmp2 %tmp5 = add i32 %tmp3, %tmp4 ret i32 %tmp5 } => define i32 @test3(<4 x i32> %x, <4 x i32> %y) { %entry: %a.sroa.0.8.vec.insert = insertelement <4 x i32> %x, i32 4294967295, i32 2 %a.sroa.0.8.vec.extract = extractelement <4 x i32> %a.sroa.0.8.vec.insert, i32 2 %a.sroa.3.28.vec.extract = extractelement <4 x i32> { 0, 0, 0, 0 }, i32 3 %a.sroa.3.16.vec.extract = extractelement <4 x i32> { 0, 0, 0, 0 }, i32 0 %tmp4 = add i32 %a.sroa.0.8.vec.extract, %a.sroa.3.28.vec.extract %tmp5 = add i32 %a.sroa.3.16.vec.extract, %tmp4 ret i32 %tmp5 } Transformation seems to be correct! ---------------------------------------- define i32 @test4(<4 x i32> %x, <4 x i32> %y, * %z) { %entry: %a = alloca i64 32, align 16 %a.x = gep inbounds * %a, 32 x i64 0, 16 x i64 0 store <4 x i32> %x, * %a.x, align 16 %a.y = gep inbounds * %a, 32 x i64 0, 16 x i64 1 store <4 x i32> %y, * %a.y, align 16 %a.y.cast = bitcast * %a.y to * %z.cast = bitcast * %z to * memcpy * %a.y.cast align 1, * %z.cast align 1, i32 16 %a.tmp1 = gep inbounds * %a, 32 x i64 0, 16 x i64 0, 4 x i64 2 %a.tmp1.cast = bitcast * %a.tmp1 to * %z.tmp1 = gep inbounds * %z, 16 x i64 0, 4 x i64 2 %z.tmp1.cast = bitcast * %z.tmp1 to * memcpy * %a.tmp1.cast align 1, * %z.tmp1.cast align 1, i32 4 %tmp1 = load i32, * %a.tmp1, align 4 %a.tmp2 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 3 %tmp2 = load i32, * %a.tmp2, align 4 %a.tmp3 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 0 %tmp3 = load i32, * %a.tmp3, align 4 %tmp4 = add i32 %tmp1, %tmp2 %tmp5 = add i32 %tmp3, %tmp4 ret i32 %tmp5 } => define i32 @test4(<4 x i32> %x, <4 x i32> %y, * %z) { %entry: %a.sroa.3.16.copyload = load <4 x i32>, * %z, align 1 %a.sroa.0.8.z.tmp1.cast.sroa_idx = gep inbounds * %z, 16 x i64 0, 4 x i64 2 %a.sroa.0.8.copyload = load i32, * %a.sroa.0.8.z.tmp1.cast.sroa_idx, align 1 %a.sroa.0.8.vec.insert = insertelement <4 x i32> %x, i32 %a.sroa.0.8.copyload, i32 2 %a.sroa.0.8.vec.extract = extractelement <4 x i32> %a.sroa.0.8.vec.insert, i32 2 %a.sroa.3.28.vec.extract = extractelement <4 x i32> %a.sroa.3.16.copyload, i32 3 %a.sroa.3.16.vec.extract = extractelement <4 x i32> %a.sroa.3.16.copyload, i32 0 %tmp4 = add i32 %a.sroa.0.8.vec.extract, %a.sroa.3.28.vec.extract %tmp5 = add i32 %a.sroa.3.16.vec.extract, %tmp4 ret i32 %tmp5 } Transformation seems to be correct! ---------------------------------------- define i32 @test5(<4 x i32> %x, <4 x i32> %y, * %z) { %entry: %a = alloca i64 32, align 16 %a.x = gep inbounds * %a, 32 x i64 0, 16 x i64 0 store <4 x i32> %x, * %a.x, align 16 %a.y = gep inbounds * %a, 32 x i64 0, 16 x i64 1 store <4 x i32> %y, * %a.y, align 16 %a.y.cast = bitcast * %a.y to * %a.x.cast = bitcast * %a.x to * memcpy * %a.x.cast align 1, * %a.y.cast align 1, i32 16 %a.tmp1 = gep inbounds * %a, 32 x i64 0, 16 x i64 0, 4 x i64 2 %a.tmp1.cast = bitcast * %a.tmp1 to * %z.tmp1 = gep inbounds * %z, 16 x i64 0, 4 x i64 2 %z.tmp1.cast = bitcast * %z.tmp1 to * memcpy * %z.tmp1.cast align 1, * %a.tmp1.cast align 1, i32 4 %tmp1 = load i32, * %a.tmp1, align 4 %a.tmp2 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 3 %tmp2 = load i32, * %a.tmp2, align 4 %a.tmp3 = gep inbounds * %a, 32 x i64 0, 16 x i64 1, 4 x i64 0 %tmp3 = load i32, * %a.tmp3, align 4 %tmp4 = add i32 %tmp1, %tmp2 %tmp5 = add i32 %tmp3, %tmp4 ret i32 %tmp5 } => define i32 @test5(<4 x i32> %x, <4 x i32> %y, * %z) { %entry: %a.sroa.0.8.a.sroa.0.8.z.tmp1.cast.sroa_cast.sroa_idx = gep inbounds * %z, 16 x i64 0, 4 x i64 2 %a.sroa.0.8.vec.extract2 = extractelement <4 x i32> %y, i32 2 store i32 %a.sroa.0.8.vec.extract2, * %a.sroa.0.8.a.sroa.0.8.z.tmp1.cast.sroa_cast.sroa_idx, align 1 %a.sroa.0.8.vec.extract = extractelement <4 x i32> %y, i32 2 %a.sroa.4.12.vec.extract = extractelement <4 x i32> %y, i32 3 %a.sroa.4.0.vec.extract = extractelement <4 x i32> %y, i32 0 %tmp4 = add i32 %a.sroa.0.8.vec.extract, %a.sroa.4.12.vec.extract %tmp5 = add i32 %a.sroa.4.0.vec.extract, %tmp4 ret i32 %tmp5 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i64 @test6(<4 x i64> %x, <4 x i64> %y, i64 %n) { %0: %tmp = alloca i64 64, align 32 %p0 = gep inbounds * %tmp, 64 x i32 0, 1 x i64 0 store <4 x i64> %x, * %p0, align 32 %p1 = gep inbounds * %tmp, 64 x i32 0, 1 x i64 32 store <4 x i64> %y, * %p1, align 32 %addr = gep inbounds * %tmp, 64 x i32 0, 1 x i64 0, 8 x i64 %n %res = load i64, * %addr, align 4 ret i64 %res } => define i64 @test6(<4 x i64> %x, <4 x i64> %y, i64 %n) { %0: %tmp = alloca i64 64, align 32 %p0 = gep inbounds * %tmp, 64 x i32 0, 1 x i64 0 store <4 x i64> %x, * %p0, align 32 %p1 = gep inbounds * %tmp, 64 x i32 0, 1 x i64 32 store <4 x i64> %y, * %p1, align 32 %addr = gep inbounds * %tmp, 64 x i32 0, 1 x i64 0, 8 x i64 %n %res = load i64, * %addr, align 4 ret i64 %res } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define <4 x i32> @test_subvec_store() { %entry: %a = alloca i64 16, align 16 %a.gep0 = gep * %a, 16 x i32 0, 4 x i32 0 %a.cast0 = bitcast * %a.gep0 to * store <2 x i32> { 0, 0 }, * %a.cast0, align 8 %a.gep1 = gep * %a, 16 x i32 0, 4 x i32 1 %a.cast1 = bitcast * %a.gep1 to * store <2 x i32> { 1, 1 }, * %a.cast1, align 8 %a.gep2 = gep * %a, 16 x i32 0, 4 x i32 2 %a.cast2 = bitcast * %a.gep2 to * store <2 x i32> { 2, 2 }, * %a.cast2, align 8 %a.gep3 = gep * %a, 16 x i32 0, 4 x i32 3 store i32 3, * %a.gep3, align 4 %ret = load <4 x i32>, * %a, align 16 ret <4 x i32> %ret } => define <4 x i32> @test_subvec_store() { %entry: %a.0.vecblend = select <4 x i1> { 1, 1, 0, 0 }, <4 x i32> { 0, 0, undef, undef }, <4 x i32> undef %a.4.vecblend = select <4 x i1> { 0, 1, 1, 0 }, <4 x i32> { undef, 1, 1, undef }, <4 x i32> %a.0.vecblend %a.8.vecblend = select <4 x i1> { 0, 0, 1, 1 }, <4 x i32> { undef, undef, 2, 2 }, <4 x i32> %a.4.vecblend %a.12.vec.insert = insertelement <4 x i32> %a.8.vecblend, i32 3, i32 3 ret <4 x i32> %a.12.vec.insert } Transformation seems to be correct! ---------------------------------------- define <4 x i32> @test_subvec_load() { %entry: %a = alloca i64 16, align 16 store <4 x i32> { 0, 1, 2, 3 }, * %a, align 16 %a.gep0 = gep * %a, 16 x i32 0, 4 x i32 0 %a.cast0 = bitcast * %a.gep0 to * %first = load <2 x i32>, * %a.cast0, align 8 %a.gep1 = gep * %a, 16 x i32 0, 4 x i32 1 %a.cast1 = bitcast * %a.gep1 to * %second = load <2 x i32>, * %a.cast1, align 8 %a.gep2 = gep * %a, 16 x i32 0, 4 x i32 2 %a.cast2 = bitcast * %a.gep2 to * %third = load <2 x i32>, * %a.cast2, align 8 %tmp = shufflevector <2 x i32> %first, <2 x i32> %second, 0, 2 %ret = shufflevector <2 x i32> %tmp, <2 x i32> %third, 0, 1, 2, 3 ret <4 x i32> %ret } => define <4 x i32> @test_subvec_load() { %entry: %a.0.vec.extract = shufflevector <4 x i32> { 0, 1, 2, 3 }, <4 x i32> poison, 0, 1 %a.4.vec.extract = shufflevector <4 x i32> { 0, 1, 2, 3 }, <4 x i32> poison, 1, 2 %a.8.vec.extract = shufflevector <4 x i32> { 0, 1, 2, 3 }, <4 x i32> poison, 2, 3 %tmp = shufflevector <2 x i32> %a.0.vec.extract, <2 x i32> %a.4.vec.extract, 0, 2 %ret = shufflevector <2 x i32> %tmp, <2 x i32> %a.8.vec.extract, 0, 1, 2, 3 ret <4 x i32> %ret } Transformation seems to be correct! ---------------------------------------- define <4 x float> @test_subvec_memset() { %entry: %a = alloca i64 16, align 16 %a.gep0 = gep * %a, 16 x i32 0, 4 x i32 0 %a.cast0 = bitcast * %a.gep0 to * memset * %a.cast0 align 1, i8 0, i32 8 %a.gep1 = gep * %a, 16 x i32 0, 4 x i32 1 %a.cast1 = bitcast * %a.gep1 to * memset * %a.cast1 align 1, i8 1, i32 8 %a.gep2 = gep * %a, 16 x i32 0, 4 x i32 2 %a.cast2 = bitcast * %a.gep2 to * memset * %a.cast2 align 1, i8 3, i32 8 %a.gep3 = gep * %a, 16 x i32 0, 4 x i32 3 %a.cast3 = bitcast * %a.gep3 to * memset * %a.cast3 align 1, i8 7, i32 4 %ret = load <4 x float>, * %a, align 16 ret <4 x float> %ret } => define <4 x float> @test_subvec_memset() { %entry: %a.0.vecblend = select <4 x i1> { 1, 1, 0, 0 }, <4 x float> { 0.000000, 0.000000, undef, undef }, <4 x float> undef %a.4.vecblend = select <4 x i1> { 0, 1, 1, 0 }, <4 x float> { undef, 0.000000, 0.000000, undef }, <4 x float> %a.0.vecblend %a.8.vecblend = select <4 x i1> { 0, 0, 1, 1 }, <4 x float> { undef, undef, 0.000000, 0.000000 }, <4 x float> %a.4.vecblend %a.12.vec.insert = insertelement <4 x float> %a.8.vecblend, float 0.000000, i32 3 ret <4 x float> %a.12.vec.insert } Transformation seems to be correct! ---------------------------------------- define <4 x float> @test_subvec_memcpy(* %x, * %y, * %z, * %f, * %out) { %entry: %a = alloca i64 16, align 16 %a.gep0 = gep * %a, 16 x i32 0, 4 x i32 0 %a.cast0 = bitcast * %a.gep0 to * memcpy * %a.cast0 align 1, * %x align 1, i32 8 %a.gep1 = gep * %a, 16 x i32 0, 4 x i32 1 %a.cast1 = bitcast * %a.gep1 to * memcpy * %a.cast1 align 1, * %y align 1, i32 8 %a.gep2 = gep * %a, 16 x i32 0, 4 x i32 2 %a.cast2 = bitcast * %a.gep2 to * memcpy * %a.cast2 align 1, * %z align 1, i32 8 %a.gep3 = gep * %a, 16 x i32 0, 4 x i32 3 %a.cast3 = bitcast * %a.gep3 to * memcpy * %a.cast3 align 1, * %f align 1, i32 4 memcpy * %out align 1, * %a.cast2 align 1, i32 8 %ret = load <4 x float>, * %a, align 16 ret <4 x float> %ret } => define <4 x float> @test_subvec_memcpy(* %x, * %y, * %z, * %f, * %out) { %entry: %a.0.x.sroa_cast = bitcast * %x to * %a.0.copyload = load <2 x float>, * %a.0.x.sroa_cast, align 1 %a.0.vec.expand = shufflevector <2 x float> %a.0.copyload, <2 x float> poison, 0, 1, 4294967295, 4294967295 %a.0.vecblend = select <4 x i1> { 1, 1, 0, 0 }, <4 x float> %a.0.vec.expand, <4 x float> undef %a.4.y.sroa_cast = bitcast * %y to * %a.4.copyload = load <2 x float>, * %a.4.y.sroa_cast, align 1 %a.4.vec.expand = shufflevector <2 x float> %a.4.copyload, <2 x float> poison, 4294967295, 0, 1, 4294967295 %a.4.vecblend = select <4 x i1> { 0, 1, 1, 0 }, <4 x float> %a.4.vec.expand, <4 x float> %a.0.vecblend %a.8.z.sroa_cast = bitcast * %z to * %a.8.copyload = load <2 x float>, * %a.8.z.sroa_cast, align 1 %a.8.vec.expand = shufflevector <2 x float> %a.8.copyload, <2 x float> poison, 4294967295, 4294967295, 0, 1 %a.8.vecblend = select <4 x i1> { 0, 0, 1, 1 }, <4 x float> %a.8.vec.expand, <4 x float> %a.4.vecblend %a.12.f.sroa_cast = bitcast * %f to * %a.12.copyload = load float, * %a.12.f.sroa_cast, align 1 %a.12.vec.insert = insertelement <4 x float> %a.8.vecblend, float %a.12.copyload, i32 3 %a.8.out.sroa_cast = bitcast * %out to * %a.8.vec.extract = shufflevector <4 x float> %a.12.vec.insert, <4 x float> poison, 2, 3 store <2 x float> %a.8.vec.extract, * %a.8.out.sroa_cast, align 1 ret <4 x float> %a.12.vec.insert } Transformation doesn't verify! ERROR: Mismatch in memory Example: * %x = pointer(non-local, block_id=1, offset=70) * %y = pointer(non-local, block_id=2, offset=11) * %z = pointer(non-local, block_id=3, offset=0) * %f = pointer(non-local, block_id=4, offset=0) * %out = pointer(non-local, block_id=5, offset=0) Source: * %a = pointer(local, block_id=8, offset=0) * %a.gep0 = pointer(local, block_id=8, offset=0) * %a.cast0 = pointer(local, block_id=8, offset=0) * %a.gep1 = pointer(local, block_id=8, offset=4) * %a.cast1 = pointer(local, block_id=8, offset=4) * %a.gep2 = pointer(local, block_id=8, offset=8) * %a.cast2 = pointer(local, block_id=8, offset=8) * %a.gep3 = pointer(local, block_id=8, offset=12) * %a.cast3 = pointer(local, block_id=8, offset=12) <4 x float> %ret = < poison, poison, poison, poison > SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 Block 1 > size: 129 align: 2 alloc type: 0 Block 2 > size: 66 align: 2 alloc type: 0 Block 3 > size: 65 align: 2 alloc type: 0 Block 4 > size: 8 align: 4 alloc type: 0 Block 5 > size: 130 align: 4 alloc type: 0 LOCAL BLOCKS: Block 8 > size: 16 align: 16 alloc type: 1 Target: * %a.0.x.sroa_cast = pointer(non-local, block_id=1, offset=70) <2 x float> %a.0.copyload = < poison, poison > <4 x float> %a.0.vec.expand = < poison, poison, any, any > <4 x float> %a.0.vecblend = < poison, poison, any, any > * %a.4.y.sroa_cast = pointer(non-local, block_id=2, offset=11) <2 x float> %a.4.copyload = < poison, poison > <4 x float> %a.4.vec.expand = < any, poison, poison, any > <4 x float> %a.4.vecblend = < poison, poison, poison, any > * %a.8.z.sroa_cast = pointer(non-local, block_id=3, offset=0) <2 x float> %a.8.copyload = < poison, poison > <4 x float> %a.8.vec.expand = < any, any, poison, poison > <4 x float> %a.8.vecblend = < poison, poison, poison, poison > * %a.12.f.sroa_cast = pointer(non-local, block_id=4, offset=0) float %a.12.copyload = poison <4 x float> %a.12.vec.insert = < poison, poison, poison, poison > * %a.8.out.sroa_cast = pointer(non-local, block_id=5, offset=0) <2 x float> %a.8.vec.extract = < poison, poison > Mismatch in pointer(non-local, block_id=5, offset=0) Source value: poison Target value: poison ------------------- SMT STATS ------------------- Num queries: 30 Num invalid: 0 Num skips: 0 Num trivial: 67 (69.1%) Num timeout: 3 (10.0%) Num errors: 0 (0.0%) Num SAT: 10 (33.3%) Num UNSAT: 17 (56.7%) 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/vector-promotion.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SROA/vector-promotion.ll