Add memory optimization bugs that are found by Alive2
ADD
tests/alive-tv/bugs/pr42699.srctgt.ll
+; Reported by Alive2
+
+define i64 @src(i8* %foo, i64 %i, i64 %j) {
+ %bit = bitcast i8* %foo to i32*
+ %gep1 = getelementptr inbounds i32, i32* %bit, i64 %i
+ %gep2 = getelementptr inbounds i8, i8* %foo, i64 %j
+ %cast1 = ptrtoint i32* %gep1 to i64
+ %cast2 = ptrtoint i8* %gep2 to i64
+ %sub = sub i64 %cast1, %cast2
+ ret i64 %sub
+}
+
+define i64 @tgt(i8* %foo, i64 %i, i64 %j) {
+ %gep1.idx = shl nuw i64 %i, 2
+ %x = sub i64 %gep1.idx, %j
+ ret i64 %x
+}
+
+; ERROR: Target is more poisonous than source

ADD
tests/alive-tv/bugs/pr43501.srctgt.ll
+; Found by Alive2
+
+define [4 x float]* @src([9 x [4 x float]]* %A) {
+ %c = bitcast [9 x [4 x float]]* %A to [4 x float]*
+ ret [4 x float]* %c
+}
+
+define [4 x float]* @tgt([9 x [4 x float]]* %A) {
+ %c = getelementptr inbounds [9 x [4 x float]], [9 x [4 x float]]* %A, i64 0, i64 0
+ ret [4 x float]* %c
+}
+
+; ERROR: Target is more poisonous than source

ADD
tests/alive-tv/bugs/pr43880.srctgt.ll
+; Found by Alive2
+
+target datalayout = "e-i8:8:8-i16:16:16"
+target triple = "x86_64-unknown-unknown"
+declare i32 @memcmp(i8* nocapture, i8* nocapture, i64)
+
+define i32 @src(i8* nocapture readonly %x, i8* nocapture readonly %y) {
+ %call = tail call i32 @memcmp(i8* %x, i8* %y, i64 2)
+ ret i32 %call
+}
+
+define i32 @tgt(i8* nocapture readonly %x, i8* nocapture readonly %y) {
+ %1 = bitcast i8* %x to i16*
+ %2 = bitcast i8* %y to i16*
+ %3 = load i16, i16* %1
+ %4 = load i16, i16* %2
+ %5 = call i16 @llvm.bswap.i16(i16 %3)
+ %6 = call i16 @llvm.bswap.i16(i16 %4)
+ %7 = zext i16 %5 to i32
+ %8 = zext i16 %6 to i32
+ %9 = sub i32 %7, %8
+ ret i32 %9
+}
+
+; Function Attrs: nounwind readnone speculatable willreturn
+declare i16 @llvm.bswap.i16(i16) #0
+
+attributes #0 = { nounwind readnone speculatable willreturn }
+
+; ERROR: Source is more defined than target

ADD
tests/alive-tv/bugs/pr44306.srctgt.ll
+; Found by Alive2
+
+define void @src(i32* %pz, i32* %px, i32* %py) {
+ %t2 = load i32, i32* %py
+ %t3 = load i32, i32* %px
+ %cmp = icmp slt i32 %t2, %t3
+ %select = select i1 %cmp, i32* %px, i32* %py
+ %bc = bitcast i32* %select to i64*
+ %r = load i64, i64* %bc
+ %t1 = bitcast i32* %pz to i64*
+ store i64 %r, i64* %t1
+ ret void
+}
+
+define void @tgt(i32* %pz, i32* %px, i32* %py) {
+ %t2 = load i32, i32* %py, align 4
+ %t3 = load i32, i32* %px, align 4
+ %cmp = icmp slt i32 %t2, %t3
+ %r1 = select i1 %cmp, i32 %t3, i32 %t2
+ store i32 %r1, i32* %pz, align 4
+ ret void
+}
+
+; ERROR: Mismatch in memory

ADD
tests/alive-tv/bugs/pr44321.srctgt.ll
+; Found by Alive2
+
+define i32* @src(<7 x i32>* %x, i64 %y, i64 %z) {
+ %arr_ptr = bitcast <7 x i32>* %x to [7 x i32]*
+ %gep = getelementptr [7 x i32], [7 x i32]* %arr_ptr, i64 %y, i64 %z
+ ret i32* %gep
+}
+
+define i32* @tgt(<7 x i32>* %x, i64 %y, i64 %z) {
+ %gep = getelementptr <7 x i32>, <7 x i32>* %x, i64 %y, i64 %z
+ ret i32* %gep
+}
+
+; ERROR: Value mismatch

ADD
tests/alive-tv/bugs/pr44388.srctgt.ll
+; Found by Alive2
+
+define void @src(i32* nocapture %P) nounwind ssp {
+entry:
+ %0 = bitcast i32* %P to i8*
+ tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 12, i1 false)
+ %add.ptr = getelementptr inbounds i32, i32* %P, i64 3
+ %1 = bitcast i32* %add.ptr to i8*
+ tail call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 12, i1 false)
+ ret void
+}
+
+define void @tgt(i32* nocapture %P) #0 {
+entry:
+ %0 = bitcast i32* %P to i8*
+ %add.ptr = getelementptr inbounds i32, i32* %P, i64 3
+ %1 = bitcast i32* %add.ptr to i8*
+ %2 = bitcast i32* %P to i8*
+ call void @llvm.memset.p0i8.i64(i8* align 4 %2, i8 0, i64 24, i1 false)
+ ret void
+}
+; Function Attrs: argmemonly nounwind willreturn
+declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
+
+attributes #0 = { nounwind ssp }
+attributes #1 = { argmemonly nounwind willreturn }
+
+; ERROR: Source is more defined than target

ADD
tests/alive-tv/bugs/pr44403.srctgt.ll
+; Found by Alive2
+
+define i8* @src(i8* %p, i8* %q) {
+ %i = ptrtoint i8* %p to i64
+ %j = ptrtoint i8* %q to i64
+ %diff = sub i64 %j, %i
+ %p2 = getelementptr i8, i8* %p, i64 %diff
+ ret i8* %p2
+}
+
+define i8* @tgt(i8* %p, i8* %q) {
+ ret i8* %q
+}
+
+; ERROR: Value mismatch

ADD
tests/alive-tv/bugs/pr44533.srctgt.ll
+; Found by Alive2
+; TEST-ARGS: -smt-to=5000
+target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64-p:64:64:64-p1:32:32:32"
+
+define void @src([10 x [5 x i32]]* %input, i64 %s, i64 %t) {
+ %p0 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %input, i64 0, i64 %s, i64 %t
+ call void @foo(i32* %p0)
+
+ %s2 = shl nsw i64 %s, 1
+ %p1 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %input, i64 0, i64 %s2, i64 %t
+ call void @foo(i32* %p1)
+
+ ret void
+}
+
+define void @tgt([10 x [5 x i32]]* %input, i64 %s, i64 %t) {
+ %p0 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %input, i64 0, i64 %s, i64 %t
+ call void @foo(i32* %p0)
+ %1 = mul i64 %s, 5
+ %p1 = getelementptr inbounds i32, i32* %p0, i64 %1
+ call void @foo(i32* %p1)
+ ret void
+}
+declare void @foo(i32*)
+
+; ERROR: Source is more defined than target

ADD
tests/alive-tv/bugs/pr44536.srctgt.ll
+; Found by Alive2
+
+@arr_i32 = global [32 x i32] zeroinitializer, align 16
+declare i32 @foobar(i32)
+
+define void @src(i32 %val) {
+entry:
+ %0 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 0), align 16
+ %1 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 1), align 4
+ %add = add nsw i32 %1, %0
+ %2 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 2), align 8
+ %add.1 = add nsw i32 %2, %add
+ %3 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 3), align 4
+ %add.2 = add nsw i32 %3, %add.1
+ %4 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 4), align 16
+ %add.3 = add nsw i32 %4, %add.2
+ %5 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 5), align 4
+ %add.4 = add nsw i32 %5, %add.3
+ %6 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 6), align 8
+ %add.5 = add nsw i32 %6, %add.4
+ %7 = load i32, i32* getelementptr inbounds ([32 x i32], [32 x i32]* @arr_i32, i64 0, i64 7), align 4
+ %add.6 = add nsw i32 %7, %add.5
+ %res = call i32 @foobar(i32 %add.6)
+ ret void
+}
+
+define void @tgt(i32 %val) #0 {
+entry:
+ %0 = load <8 x i32>, <8 x i32>* bitcast ([32 x i32]* @arr_i32 to <8 x i32>*), align 16
+ %rdx.shuf = shufflevector <8 x i32> %0, <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
+ %bin.rdx = add nsw <8 x i32> %0, %rdx.shuf
+ %rdx.shuf1 = shufflevector <8 x i32> %bin.rdx, <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
+ %bin.rdx2 = add nsw <8 x i32> %bin.rdx, %rdx.shuf1
+ %rdx.shuf3 = shufflevector <8 x i32> %bin.rdx2, <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
+ %bin.rdx4 = add nsw <8 x i32> %bin.rdx2, %rdx.shuf3
+ %1 = extractelement <8 x i32> %bin.rdx4, i32 0
+ %res = call i32 @foobar(i32 %1)
+ ret void
+}
+
+attributes #0 = { "target-cpu"="corei7-avx" }
+
+; ERROR: Source is more defined than target

ADD
tests/alive-tv/bugs/pr44543.srctgt.ll
+; Found by Alive2
+target datalayout = "p:64:64:64-i64:32:32"
+
+define i64* @src(i8* %x) {
+entry:
+ %p = bitcast i8* %x to i64*
+ %b1 = load i64, i64* %p
+ %p2 = inttoptr i64 %b1 to i64*
+ ret i64* %p2
+}
+
+define i64* @tgt(i8* %x) {
+entry:
+ %0 = bitcast i8* %x to i64**
+ %b11 = load i64*, i64** %0, align 8
+ ret i64* %b11
+}
+
+; ERROR: Source is more defined than target

ADD
tests/alive-tv/bugs/pr44861.srctgt.ll
+; Found by Alive2
+declare void @g(i8*)
+
+define void @src(i8* %ptr, i1 %cc1, i1 %cc2, i1 %cc3, i32 %arg) {
+entry:
+ br i1 %cc1, label %do.end, label %if.then
+
+if.then:
+ br i1 %cc2, label %do.body, label %do.end
+
+do.body:
+ %phi = phi i32 [ %arg, %if.then ]
+ %phi.ext = zext i32 %phi to i64
+ %ptr2 = getelementptr inbounds i8, i8* %ptr, i64 %phi.ext
+ %ptr3 = getelementptr inbounds i8, i8* %ptr2, i64 -1
+ call void @g(i8* %ptr3)
+ br i1 %cc3, label %do.end, label %if.then
+
+do.end:
+ ret void
+}
+
+define void @tgt(i8* %ptr, i1 %cc1, i1 %cc2, i1 %cc3, i32 %arg) {
+ br i1 %cc1, label %do.end, label %if.then
+
+if.then: ; preds = %do.body, %entry
+ br i1 %cc2, label %do.body, label %do.end
+
+do.body: ; preds = %if.then
+ %phi.ext = zext i32 %arg to i64
+ %ptr2 = getelementptr inbounds i8, i8* %ptr, i64 -1
+ %ptr3 = getelementptr inbounds i8, i8* %ptr2, i64 %phi.ext
+ call void @g(i8* nonnull %ptr3)
+ br i1 %cc3, label %do.end, label %if.then
+
+do.end: ; preds = %do.body, %if.then, %entry
+ ret void
+}
+
+; ERROR: Source is more defined than target

ADD
tests/alive-tv/bugs/pr45152.srctgt.ll
+; Found by Alive
+; TEST-ARGS: -disable-undef-input -smt-to=10000
+
+@Q = internal unnamed_addr global double 1.000000e+00, align 8
+
+define double @src(i1 %c, i64* %p) {
+entry:
+ br i1 %c, label %if, label %end
+
+if:
+ %load = load i64, i64* bitcast (double* @Q to i64*), align 8
+ br label %end
+
+end:
+ %phi = phi i64 [ 0, %entry ], [ %load, %if ]
+ store i64 %phi, i64* %p, align 8
+ %cast = bitcast i64 %phi to double
+ ret double %cast
+
+ uselistorder i64 %phi, { 1, 0 }
+}
+
+define double @tgt(i1 %c, i64* %p) {
+entry:
+ br i1 %c, label %if, label %end
+
+if: ; preds = %entry
+ %load1 = load double, double* @Q, align 8
+ br label %end
+
+end: ; preds = %if, %entry
+ %0 = phi double [ 0.000000e+00, %entry ], [ %load1, %if ]
+ %1 = bitcast i64* %p to double*
+ store double %0, double* %1, align 8
+ ret double %0
+}
+
+; ERROR: Mismatch in memory

ADD
tests/alive-tv/bugs/pr45210.srctgt.ll
+; Found by Alive2
+target datalayout="p:32:32:32-p1:16:16:16-n8:16:32:64"
+
+@G16 = internal constant [10 x i16] [i16 35, i16 82, i16 69, i16 81, i16 85,
+ i16 73, i16 82, i16 69, i16 68, i16 0]
+
+define i1 @src(i32 %X) {
+ %P = getelementptr [10 x i16], [10 x i16]* @G16, i32 0, i32 %X
+ %Q = load i16, i16* %P
+ %R = icmp eq i16 %Q, 0
+ ret i1 %R
+}
+
+define i1 @tgt(i32 %X) {
+ %R = icmp eq i32 %X, 9
+ ret i1 %R
+}
+
+; ERROR: Value mismatch

ADD
tests/alive-tv/bugs/pr45445.srctgt.ll
+; Found by Alive2
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+define <2 x i32*> @src(i32* %base, i64 %idx) {
+ %basevec = insertelement <2 x i32*> undef, i32* %base, i32 0
+ %idxvec = insertelement <2 x i64> undef, i64 %idx, i32 1
+ %gep = getelementptr i32, <2 x i32*> %basevec, <2 x i64> %idxvec
+ ret <2 x i32*> %gep
+}
+
+define <2 x i32*> @tgt(i32* %base, i64 %idx) {
+ ret <2 x i32*> undef
+}
+
+; ERROR: Value mismatch

ADD
tests/alive-tv/bugs/pr45957.srctgt.ll
+; Found by Alive2
+target triple = "x86_64-pc-linux"
+
+define <32 x i8> @src(<96 x i8>* %ptr){
+ %wide.vec = load <96 x i8>, <96 x i8>* %ptr
+ %v1 = shufflevector <96 x i8> %wide.vec, <96 x i8> undef,<32 x i32> <i32 0,i32 3,i32 6,i32 9,i32 12,i32 15,i32 18,i32 21,i32 24,i32 27,i32 30,i32 33,i32 36,i32 39,i32 42,i32 45,i32 48,i32 51,i32 54,i32 57,i32 60,i32 63,i32 66,i32 69,i32 72,i32 75,i32 78,i32 81,i32 84,i32 87,i32 90,i32 93>
+ %v2 = shufflevector <96 x i8> %wide.vec, <96 x i8> undef,<32 x i32> <i32 1,i32 4,i32 7,i32 10,i32 13,i32 16,i32 19,i32 22,i32 25,i32 28,i32 31,i32 34,i32 37,i32 40,i32 43,i32 46,i32 49,i32 52,i32 55,i32 58,i32 61,i32 64,i32 67,i32 70,i32 73,i32 76,i32 79,i32 82,i32 85,i32 88,i32 91,i32 94>
+ %v3 = shufflevector <96 x i8> %wide.vec, <96 x i8> undef,<32 x i32> <i32 2,i32 5,i32 8,i32 11,i32 14,i32 17,i32 20,i32 23,i32 26,i32 29,i32 32,i32 35,i32 38,i32 41,i32 44,i32 47,i32 50,i32 53,i32 56,i32 59,i32 62,i32 65,i32 68,i32 71,i32 74,i32 77,i32 80,i32 83,i32 86,i32 89,i32 92,i32 95>
+ %add1 = add <32 x i8> %v1, %v2
+ %add2 = add <32 x i8> %v3, %add1
+ ret <32 x i8> %add2
+}
+
+define <32 x i8> @tgt(<96 x i8>* %ptr) #0 {
+ %1 = bitcast <96 x i8>* %ptr to <16 x i8>*
+ %2 = getelementptr <16 x i8>, <16 x i8>* %1, i32 0
+ %3 = load <16 x i8>, <16 x i8>* %2, align 128
+ %4 = getelementptr <16 x i8>, <16 x i8>* %1, i32 1
+ %5 = load <16 x i8>, <16 x i8>* %4, align 128
+ %6 = getelementptr <16 x i8>, <16 x i8>* %1, i32 2
+ %7 = load <16 x i8>, <16 x i8>* %6, align 128
+ %8 = getelementptr <16 x i8>, <16 x i8>* %1, i32 3
+ %9 = load <16 x i8>, <16 x i8>* %8, align 128
+ %10 = getelementptr <16 x i8>, <16 x i8>* %1, i32 4
+ %11 = load <16 x i8>, <16 x i8>* %10, align 128
+ %12 = getelementptr <16 x i8>, <16 x i8>* %1, i32 5
+ %13 = load <16 x i8>, <16 x i8>* %12, align 128
+ %14 = shufflevector <16 x i8> %3, <16 x i8> %9, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
+ %15 = shufflevector <16 x i8> %5, <16 x i8> %11, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
+ %16 = shufflevector <16 x i8> %7, <16 x i8> %13, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
+ %17 = shufflevector <32 x i8> %14, <32 x i8> undef, <32 x i32> <i32 0, i32 3, i32 6, i32 9, i32 12, i32 15, i32 2, i32 5, i32 8, i32 11, i32 14, i32 1, i32 4, i32 7, i32 10, i32 13, i32 16, i32 19, i32 22, i32 25, i32 28, i32 31, i32 18, i32 21, i32 24, i32 27, i32 30, i32 17, i32 20, i32 23, i32 26, i32 29>
+ %18 = shufflevector <32 x i8> %15, <32 x i8> undef, <32 x i32> <i32 0, i32 3, i32 6, i32 9, i32 12, i32 15, i32 2, i32 5, i32 8, i32 11, i32 14, i32 1, i32 4, i32 7, i32 10, i32 13, i32 16, i32 19, i32 22, i32 25, i32 28, i32 31, i32 18, i32 21, i32 24, i32 27, i32 30, i32 17, i32 20, i32 23, i32 26, i32 29>
+ %19 = shufflevector <32 x i8> %16, <32 x i8> undef, <32 x i32> <i32 0, i32 3, i32 6, i32 9, i32 12, i32 15, i32 2, i32 5, i32 8, i32 11, i32 14, i32 1, i32 4, i32 7, i32 10, i32 13, i32 16, i32 19, i32 22, i32 25, i32 28, i32 31, i32 18, i32 21, i32 24, i32 27, i32 30, i32 17, i32 20, i32 23, i32 26, i32 29>
+ %20 = shufflevector <32 x i8> %19, <32 x i8> %17, <32 x i32> <i32 11, i32 12, i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 27, i32 28, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58>
+ %21 = shufflevector <32 x i8> %17, <32 x i8> %18, <32 x i32> <i32 11, i32 12, i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 27, i32 28, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58>
+ %22 = shufflevector <32 x i8> %18, <32 x i8> %19, <32 x i32> <i32 11, i32 12, i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 27, i32 28, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58>
+ %23 = shufflevector <32 x i8> %21, <32 x i8> %20, <32 x i32> <i32 11, i32 12, i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 27, i32 28, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58>
+ %24 = shufflevector <32 x i8> %22, <32 x i8> %21, <32 x i32> <i32 11, i32 12, i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 27, i32 28, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58>
+ %25 = shufflevector <32 x i8> %20, <32 x i8> %22, <32 x i32> <i32 11, i32 12, i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 27, i32 28, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58>
+ %26 = shufflevector <32 x i8> %24, <32 x i8> undef, <32 x i32> <i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 0, i32 1, i32 2, i32 3, i32 4, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 16, i32 17, i32 18, i32 19, i32 20>
+ %27 = shufflevector <32 x i8> %23, <32 x i8> undef, <32 x i32> <i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25>
+ %add1 = add <32 x i8> %27, %26
+ %add2 = add <32 x i8> %25, %add1
+ ret <32 x i8> %add2
+}
+; ERROR: Source is more defined than target

Add memory optimization bugs that are found by Alive2 (#419)