Test Failure: Transforms/InstCombine/vec_shuffle.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define <4 x float> @test1(<4 x float> %v1) {
%0:
  %v2 = shufflevector <4 x float> %v1, <4 x float> undef, 0, 1, 2, 3
  ret <4 x float> %v2
}
=>
define <4 x float> @test1(<4 x float> %v1) {
%0:
  ret <4 x float> %v1
}
Transformation seems to be correct!


----------------------------------------
define <4 x float> @test2(<4 x float> %v1) {
%0:
  %v2 = shufflevector <4 x float> %v1, <4 x float> %v1, 0, 5, 2, 7
  ret <4 x float> %v2
}
=>
define <4 x float> @test2(<4 x float> %v1) {
%0:
  ret <4 x float> %v1
}
Transformation seems to be correct!


----------------------------------------
define float @test3(<4 x float> %A, <4 x float> %B, float %f) {
%0:
  %C = insertelement <4 x float> %A, float %f, i32 0
  %D = shufflevector <4 x float> %C, <4 x float> %B, 5, 0, 2, 7
  %E = extractelement <4 x float> %D, i32 1
  ret float %E
}
=>
define float @test3(<4 x float> %A, <4 x float> %B, float %f) {
%0:
  ret float %f
}
Transformation seems to be correct!


----------------------------------------
define i32 @test4(<4 x i32> %X) {
%0:
  %t = shufflevector <4 x i32> %X, <4 x i32> undef, 0, 0, 0, 0
  %r = extractelement <4 x i32> %t, i32 0
  ret i32 %r
}
=>
define i32 @test4(<4 x i32> %X) {
%0:
  %r = extractelement <4 x i32> %X, i32 0
  ret i32 %r
}
Transformation seems to be correct!


----------------------------------------
define i32 @test5(<4 x i32> %X) {
%0:
  %t = shufflevector <4 x i32> %X, <4 x i32> undef, 3, 2, 4294967295, 4294967295
  %r = extractelement <4 x i32> %t, i32 0
  ret i32 %r
}
=>
define i32 @test5(<4 x i32> %X) {
%0:
  %r = extractelement <4 x i32> %X, i32 3
  ret i32 %r
}
Transformation seems to be correct!


----------------------------------------
define float @test6(<4 x float> %X) {
%0:
  %X1 = bitcast <4 x float> %X to <4 x i32>
  %t = shufflevector <4 x i32> %X1, <4 x i32> undef, 0, 0, 0, 0
  %t2 = bitcast <4 x i32> %t to <4 x float>
  %r = extractelement <4 x float> %t2, i32 0
  ret float %r
}
=>
define float @test6(<4 x float> %X) {
%0:
  %r = extractelement <4 x float> %X, i32 0
  ret float %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x float> @test7(<4 x float> %x) {
%0:
  %r = shufflevector <4 x float> %x, <4 x float> undef, 0, 1, 6, 7
  ret <4 x float> %r
}
=>
define <4 x float> @test7(<4 x float> %x) {
%0:
  %r = shufflevector <4 x float> %x, <4 x float> undef, 0, 1, 4294967295, 4294967295
  ret <4 x float> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x float> @test8(<4 x float> %x, <4 x float> %y) {
%0:
  %t4 = extractelement <4 x float> %x, i32 1
  %t2 = extractelement <4 x float> %x, i32 3
  %t1 = extractelement <4 x float> %y, i32 0
  %t128 = insertelement <4 x float> undef, float %t4, i32 0
  %t130 = insertelement <4 x float> %t128, float undef, i32 1
  %t132 = insertelement <4 x float> %t130, float %t2, i32 2
  %t134 = insertelement <4 x float> %t132, float %t1, i32 3
  ret <4 x float> %t134
}
=>
define <4 x float> @test8(<4 x float> %x, <4 x float> %y) {
%0:
  %t134 = shufflevector <4 x float> %x, <4 x float> %y, 1, 4294967295, 3, 4
  ret <4 x float> %t134
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @test9(<16 x i8> %t6) {
%0:
  %t7 = shufflevector <16 x i8> %t6, <16 x i8> undef, 13, 9, 4, 13
  %t9 = shufflevector <4 x i8> %t7, <4 x i8> undef, 3, 1, 2, 0
  ret <4 x i8> %t9
}
=>
define <4 x i8> @test9(<16 x i8> %t6) {
%0:
  %t9 = shufflevector <16 x i8> %t6, <16 x i8> undef, 13, 9, 4, 13
  ret <4 x i8> %t9
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @test9a(<16 x i8> %t6) {
%0:
  %t7 = shufflevector <16 x i8> %t6, <16 x i8> undef, 4294967295, 9, 4, 8
  %t9 = shufflevector <4 x i8> %t7, <4 x i8> undef, 3, 1, 2, 0
  ret <4 x i8> %t9
}
=>
define <4 x i8> @test9a(<16 x i8> %t6) {
%0:
  %t7 = shufflevector <16 x i8> %t6, <16 x i8> undef, 4294967295, 9, 4, 8
  %t9 = shufflevector <4 x i8> %t7, <4 x i8> undef, 3, 1, 2, 4294967295
  ret <4 x i8> %t9
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @test9b(<4 x i8> %t6, <4 x i8> %t7) {
%0:
  %t1 = shufflevector <4 x i8> %t6, <4 x i8> %t7, 0, 1, 4, 5, 4, 5, 2, 3
  %t9 = shufflevector <8 x i8> %t1, <8 x i8> undef, 0, 1, 4, 5
  ret <4 x i8> %t9
}
=>
define <4 x i8> @test9b(<4 x i8> %t6, <4 x i8> %t7) {
%0:
  %t9 = shufflevector <4 x i8> %t6, <4 x i8> %t7, 0, 1, 4, 5
  ret <4 x i8> %t9
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @test10(<4 x i32> %t5) {
%0:
  %t6 = shufflevector <4 x i32> %t5, <4 x i32> undef, 1, 4294967295, 4294967295, 4294967295
  %t7 = shufflevector <4 x i32> %t6, <4 x i32> undef, 0, 0, 0, 0
  ret <4 x i32> %t7
}
=>
define <4 x i32> @test10(<4 x i32> %t5) {
%0:
  %t7 = shufflevector <4 x i32> %t5, <4 x i32> undef, 1, 1, 1, 1
  ret <4 x i32> %t7
}
Transformation seems to be correct!


----------------------------------------
define <8 x i8> @test11(<16 x i8> %t6) {
%0:
  %t1 = shufflevector <16 x i8> %t6, <16 x i8> undef, 0, 1, 2, 3
  %t2 = shufflevector <16 x i8> %t6, <16 x i8> undef, 4, 5, 6, 7
  %t3 = shufflevector <4 x i8> %t1, <4 x i8> %t2, 0, 1, 2, 3, 4, 5, 6, 7
  ret <8 x i8> %t3
}
=>
define <8 x i8> @test11(<16 x i8> %t6) {
%0:
  %t3 = shufflevector <16 x i8> %t6, <16 x i8> undef, 0, 1, 2, 3, 4, 5, 6, 7
  ret <8 x i8> %t3
}
Transformation seems to be correct!


----------------------------------------
define <8 x i8> @test12(<8 x i8> %t6, <8 x i8> %t2) {
%0:
  %t1 = shufflevector <8 x i8> %t6, <8 x i8> undef, 0, 1, 2, 3, 5, 4, 4294967295, 7
  %t3 = shufflevector <8 x i8> %t1, <8 x i8> %t2, 0, 1, 2, 3, 9, 8, 11, 12
  ret <8 x i8> %t3
}
=>
define <8 x i8> @test12(<8 x i8> %t6, <8 x i8> %t2) {
%0:
  %t3 = shufflevector <8 x i8> %t6, <8 x i8> %t2, 0, 1, 2, 3, 9, 8, 11, 12
  ret <8 x i8> %t3
}
Transformation seems to be correct!


----------------------------------------
define <8 x i8> @test12a(<8 x i8> %t6, <8 x i8> %t2) {
%0:
  %t1 = shufflevector <8 x i8> %t6, <8 x i8> undef, 0, 1, 2, 3, 5, 4, 4294967295, 7
  %t3 = shufflevector <8 x i8> %t2, <8 x i8> %t1, 0, 3, 1, 4, 8, 9, 10, 11
  ret <8 x i8> %t3
}
=>
define <8 x i8> @test12a(<8 x i8> %t6, <8 x i8> %t2) {
%0:
  %t3 = shufflevector <8 x i8> %t2, <8 x i8> %t6, 0, 3, 1, 4, 8, 9, 10, 11
  ret <8 x i8> %t3
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @extract_subvector_of_shuffle(<2 x i8> %x, <2 x i8> %y) {
%0:
  %shuf = shufflevector <2 x i8> %x, <2 x i8> %y, 0, 2, 0
  %extract_subv = shufflevector <3 x i8> %shuf, <3 x i8> undef, 0, 1
  ret <2 x i8> %extract_subv
}
=>
define <2 x i8> @extract_subvector_of_shuffle(<2 x i8> %x, <2 x i8> %y) {
%0:
  %extract_subv = shufflevector <2 x i8> %x, <2 x i8> %y, 0, 2
  ret <2 x i8> %extract_subv
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @extract_subvector_of_shuffle_undefs_types(<2 x i8> %x, <2 x i8> %y) {
%0:
  %shuf = shufflevector <2 x i8> %x, <2 x i8> %y, 4294967295, 2, 0, 1, 0
  %extract_subv = shufflevector <5 x i8> %shuf, <5 x i8> undef, 0, 1, 2, 4294967295
  ret <4 x i8> %extract_subv
}
=>
define <4 x i8> @extract_subvector_of_shuffle_undefs_types(<2 x i8> %x, <2 x i8> %y) {
%0:
  %extract_subv = shufflevector <2 x i8> %x, <2 x i8> %y, 4294967295, 2, 0, 4294967295
  ret <4 x i8> %extract_subv
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @extract_subvector_of_shuffle_extra_use(<2 x i8> %x, <2 x i8> %y) {
%0:
  %shuf = shufflevector <2 x i8> %x, <2 x i8> %y, 4294967295, 2, 0, 1, 0
  call void @use_v5i8(<5 x i8> %shuf)
  %extract_subv = shufflevector <5 x i8> %shuf, <5 x i8> undef, 0, 1, 2, 4294967295
  ret <4 x i8> %extract_subv
}
=>
define <4 x i8> @extract_subvector_of_shuffle_extra_use(<2 x i8> %x, <2 x i8> %y) {
%0:
  %shuf = shufflevector <2 x i8> %x, <2 x i8> %y, 4294967295, 2, 0, 1, 0
  call void @use_v5i8(<5 x i8> %shuf)
  %extract_subv = shufflevector <5 x i8> %shuf, <5 x i8> undef, 0, 1, 2, 4294967295
  ret <4 x i8> %extract_subv
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @test13a(i8 %x1, i8 %x2) {
%0:
  %A = insertelement <2 x i8> undef, i8 %x1, i32 0
  %B = insertelement <2 x i8> %A, i8 %x2, i32 1
  %C = add <2 x i8> %B, { 5, 7 }
  %D = shufflevector <2 x i8> %C, <2 x i8> undef, 1, 0
  ret <2 x i8> %D
}
=>
define <2 x i8> @test13a(i8 %x1, i8 %x2) {
%0:
  %1 = insertelement <2 x i8> undef, i8 %x1, i32 1
  %2 = insertelement <2 x i8> %1, i8 %x2, i32 0
  %3 = add <2 x i8> %2, { 7, 5 }
  ret <2 x i8> %3
}
Transformation seems to be correct!


----------------------------------------
define <3 x i32> @add_wider(i32 %y, i32 %z) {
%0:
  %i0 = insertelement <2 x i32> undef, i32 %y, i32 0
  %i1 = insertelement <2 x i32> %i0, i32 %z, i32 1
  %a = add <2 x i32> %i1, { 255, 255 }
  %ext = shufflevector <2 x i32> %a, <2 x i32> undef, 0, 1, 4294967295
  ret <3 x i32> %ext
}
=>
define <3 x i32> @add_wider(i32 %y, i32 %z) {
%0:
  %i0 = insertelement <2 x i32> undef, i32 %y, i32 0
  %i1 = insertelement <2 x i32> %i0, i32 %z, i32 1
  %a = add <2 x i32> %i1, { 255, 255 }
  %ext = shufflevector <2 x i32> %a, <2 x i32> undef, 0, 1, 4294967295
  ret <3 x i32> %ext
}
Transformation seems to be correct!


----------------------------------------
define <3 x i32> @div_wider(i32 %y, i32 %z) {
%0:
  %i0 = insertelement <2 x i32> undef, i32 %y, i32 0
  %i1 = insertelement <2 x i32> %i0, i32 %z, i32 1
  %a = sdiv <2 x i32> %i1, { 255, 255 }
  %ext = shufflevector <2 x i32> %a, <2 x i32> undef, 0, 1, 4294967295
  ret <3 x i32> %ext
}
=>
define <3 x i32> @div_wider(i32 %y, i32 %z) {
%0:
  %i0 = insertelement <2 x i32> undef, i32 %y, i32 0
  %i1 = insertelement <2 x i32> %i0, i32 %z, i32 1
  %a = sdiv <2 x i32> %i1, { 255, 255 }
  %ext = shufflevector <2 x i32> %a, <2 x i32> undef, 0, 1, 4294967295
  ret <3 x i32> %ext
}
Transformation seems to be correct!


----------------------------------------
define <3 x i8> @fold_inselts_with_widening_shuffle(i8 %x, i8 %y) {
%0:
  %ins0 = insertelement <2 x i8> undef, i8 %x, i32 0
  %ins1 = insertelement <2 x i8> %ins0, i8 %y, i32 1
  %widen = shufflevector <2 x i8> %ins1, <2 x i8> undef, 0, 1, 4294967295
  ret <3 x i8> %widen
}
=>
define <3 x i8> @fold_inselts_with_widening_shuffle(i8 %x, i8 %y) {
%0:
  %1 = insertelement <3 x i8> undef, i8 %x, i32 0
  %2 = insertelement <3 x i8> %1, i8 %y, i32 1
  ret <3 x i8> %2
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @test13b(i8 %x) {
%0:
  %A = insertelement <2 x i8> undef, i8 %x, i32 0
  %B = shufflevector <2 x i8> %A, <2 x i8> undef, 4294967295, 0
  ret <2 x i8> %B
}
=>
define <2 x i8> @test13b(i8 %x) {
%0:
  %B = insertelement <2 x i8> undef, i8 %x, i32 1
  ret <2 x i8> %B
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @test13c(i8 %x1, i8 %x2) {
%0:
  %A = insertelement <4 x i8> undef, i8 %x1, i32 0
  %B = insertelement <4 x i8> %A, i8 %x2, i32 2
  %C = shufflevector <4 x i8> %B, <4 x i8> undef, 0, 2
  ret <2 x i8> %C
}
=>
define <2 x i8> @test13c(i8 %x1, i8 %x2) {
%0:
  %1 = insertelement <2 x i8> undef, i8 %x1, i32 0
  %2 = insertelement <2 x i8> %1, i8 %x2, i32 1
  ret <2 x i8> %2
}
Transformation seems to be correct!


----------------------------------------
define void @test14(i16 %conv10) {
%0:
  %t = alloca i64 8, align 8
  %vecinit6 = insertelement <4 x i16> undef, i16 23, i32 3
  store <4 x i16> %vecinit6, * undef, align 8
  %t1 = load <4 x i16>, * undef, align 8
  %vecinit11 = insertelement <4 x i16> undef, i16 %conv10, i32 3
  %div = udiv <4 x i16> %t1, %vecinit11
  store <4 x i16> %div, * %t, align 8
  %t4 = load <4 x i16>, * %t, align 8
  %t5 = shufflevector <4 x i16> %t4, <4 x i16> undef, 2, 0
  %cmp = icmp ule <2 x i16> %t5, undef
  %sext = sext <2 x i1> %cmp to <2 x i16>
  ret void
}
=>
define void @test14(i16 %conv10) {
%0:
  store <4 x i16> { undef, undef, undef, 23 }, * undef, align 8
  ret void
}
Transformation seems to be correct!


----------------------------------------
define <4 x float> @test15a(<4 x float> %LHS, <4 x float> %RHS) {
%0:
  %t1 = extractelement <4 x float> %LHS, i32 0
  %t2 = insertelement <4 x float> %RHS, float %t1, i32 1
  %t3 = extractelement <4 x float> %RHS, i32 2
  %t4 = insertelement <4 x float> %t2, float %t3, i32 3
  ret <4 x float> %t4
}
=>
define <4 x float> @test15a(<4 x float> %LHS, <4 x float> %RHS) {
%0:
  %t4 = shufflevector <4 x float> %LHS, <4 x float> %RHS, 4, 0, 6, 6
  ret <4 x float> %t4
}
Transformation seems to be correct!


----------------------------------------
define <4 x float> @test15b(<4 x float> %LHS, <4 x float> %RHS) {
%0:
  %t0 = extractelement <4 x float> %LHS, i32 3
  %t1 = insertelement <4 x float> %RHS, float %t0, i32 0
  %t2 = extractelement <4 x float> %t1, i32 0
  %t3 = insertelement <4 x float> %RHS, float %t2, i32 1
  %t4 = extractelement <4 x float> %RHS, i32 2
  %t5 = insertelement <4 x float> %t3, float %t4, i32 3
  ret <4 x float> %t5
}
=>
define <4 x float> @test15b(<4 x float> %LHS, <4 x float> %RHS) {
%0:
  %t5 = shufflevector <4 x float> %LHS, <4 x float> %RHS, 4, 3, 6, 6
  ret <4 x float> %t5
}
Transformation seems to be correct!


----------------------------------------
define <1 x i32> @test16a(i32 %ele) {
%0:
  %t0 = insertelement <2 x i32> { 1, undef }, i32 %ele, i32 1
  %t1 = shl <2 x i32> %t0, { 1, 1 }
  %t2 = shufflevector <2 x i32> %t1, <2 x i32> undef, 0
  ret <1 x i32> %t2
}
=>
define <1 x i32> @test16a(i32 %ele) {
%0:
  ret <1 x i32> { 2 }
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @test16b(i8 %ele) {
%0:
  %t0 = insertelement <8 x i8> { 1, 1, 1, 1, 1, 1, undef, 1 }, i8 %ele, i32 6
  %t1 = shl <8 x i8> %t0, { 1, 1, 1, 1, 1, 1, 1, 1 }
  %t2 = shufflevector <8 x i8> %t1, <8 x i8> undef, 1, 2, 3, 4
  ret <4 x i8> %t2
}
=>
define <4 x i8> @test16b(i8 %ele) {
%0:
  ret <4 x i8> { 2, 2, 2, 2 }
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @shuffle_17ident(<4 x i32> %v) {
%0:
  %shuffle = shufflevector <4 x i32> %v, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %shuffle2 = shufflevector <4 x i32> %shuffle, <4 x i32> { 0, 0, 0, 0 }, 3, 0, 1, 2
  ret <4 x i32> %shuffle2
}
=>
define <4 x i32> @shuffle_17ident(<4 x i32> %v) {
%0:
  ret <4 x i32> %v
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @shuffle_17and(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %t1 = shufflevector <4 x i32> %v1, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %t2 = shufflevector <4 x i32> %v2, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %r = and <4 x i32> %t1, %t2
  ret <4 x i32> %r
}
=>
define <4 x i32> @shuffle_17and(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %1 = and <4 x i32> %v1, %v2
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 1, 2, 3, 0
  ret <4 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @shuffle_fadd_multiuse(<2 x float> %v1, <2 x float> %v2) {
%0:
  %t1 = shufflevector <2 x float> %v1, <2 x float> undef, 1, 0
  %t2 = shufflevector <2 x float> %v2, <2 x float> undef, 1, 0
  %r = fadd <2 x float> %t1, %t2
  call void @use(<2 x float> %t1)
  ret <2 x float> %r
}
=>
define <2 x float> @shuffle_fadd_multiuse(<2 x float> %v1, <2 x float> %v2) {
%0:
  %t1 = shufflevector <2 x float> %v1, <2 x float> undef, 1, 0
  %1 = fadd <2 x float> %v1, %v2
  %r = shufflevector <2 x float> %1, <2 x float> undef, 1, 0
  call void @use(<2 x float> %t1)
  ret <2 x float> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <2 x float> @shuffle_fdiv_multiuse(<2 x float> %v1, <2 x float> %v2) {
%0:
  %t1 = shufflevector <2 x float> %v1, <2 x float> undef, 1, 0
  %t2 = shufflevector <2 x float> %v2, <2 x float> undef, 1, 0
  %r = fdiv <2 x float> %t1, %t2
  call void @use(<2 x float> %t2)
  ret <2 x float> %r
}
=>
define <2 x float> @shuffle_fdiv_multiuse(<2 x float> %v1, <2 x float> %v2) {
%0:
  %t2 = shufflevector <2 x float> %v2, <2 x float> undef, 1, 0
  %1 = fdiv <2 x float> %v1, %v2
  %r = shufflevector <2 x float> %1, <2 x float> undef, 1, 0
  call void @use(<2 x float> %t2)
  ret <2 x float> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <2 x float> @shuffle_fsub_multiuse(<2 x float> %v1, <2 x float> %v2) {
%0:
  %t1 = shufflevector <2 x float> %v1, <2 x float> undef, 1, 0
  %t2 = shufflevector <2 x float> %v2, <2 x float> undef, 1, 0
  %r = fsub <2 x float> %t1, %t2
  call void @use(<2 x float> %t1)
  call void @use(<2 x float> %t2)
  ret <2 x float> %r
}
=>
define <2 x float> @shuffle_fsub_multiuse(<2 x float> %v1, <2 x float> %v2) {
%0:
  %t1 = shufflevector <2 x float> %v1, <2 x float> undef, 1, 0
  %t2 = shufflevector <2 x float> %v2, <2 x float> undef, 1, 0
  %r = fsub <2 x float> %t1, %t2
  call void @use(<2 x float> %t1)
  call void @use(<2 x float> %t2)
  ret <2 x float> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @shuffle_17add(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %t1 = shufflevector <4 x i32> %v1, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %t2 = shufflevector <4 x i32> %v2, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %r = add <4 x i32> %t1, %t2
  ret <4 x i32> %r
}
=>
define <4 x i32> @shuffle_17add(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %1 = add <4 x i32> %v1, %v2
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 1, 2, 3, 0
  ret <4 x i32> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @shuffle_17addnsw(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %t1 = shufflevector <4 x i32> %v1, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %t2 = shufflevector <4 x i32> %v2, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %r = add nsw <4 x i32> %t1, %t2
  ret <4 x i32> %r
}
=>
define <4 x i32> @shuffle_17addnsw(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %1 = add nsw <4 x i32> %v1, %v2
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 1, 2, 3, 0
  ret <4 x i32> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @shuffle_17addnuw(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %t1 = shufflevector <4 x i32> %v1, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %t2 = shufflevector <4 x i32> %v2, <4 x i32> { 0, 0, 0, 0 }, 1, 2, 3, 0
  %r = add nuw <4 x i32> %t1, %t2
  ret <4 x i32> %r
}
=>
define <4 x i32> @shuffle_17addnuw(<4 x i32> %v1, <4 x i32> %v2) {
%0:
  %1 = add nuw <4 x i32> %v1, %v2
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 1, 2, 3, 0
  ret <4 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x float> @shuffle_17fsub_fast(<4 x float> %v1, <4 x float> %v2) {
%0:
  %t1 = shufflevector <4 x float> %v1, <4 x float> { 0.000000, 0.000000, 0.000000, 0.000000 }, 1, 2, 3, 0
  %t2 = shufflevector <4 x float> %v2, <4 x float> { 0.000000, 0.000000, 0.000000, 0.000000 }, 1, 2, 3, 0
  %r = fsub fast <4 x float> %t1, %t2
  ret <4 x float> %r
}
=>
define <4 x float> @shuffle_17fsub_fast(<4 x float> %v1, <4 x float> %v2) {
%0:
  %1 = fsub fast <4 x float> %v1, %v2
  %r = shufflevector <4 x float> %1, <4 x float> undef, 1, 2, 3, 0
  ret <4 x float> %r
}
Transformation doesn't verify!
ERROR: Invalid expr


----------------------------------------
define <4 x i32> @add_const(<4 x i32> %v) {
%0:
  %t1 = shufflevector <4 x i32> %v, <4 x i32> undef, 1, 2, 3, 0
  %r = add <4 x i32> %t1, { 41, 42, 43, 44 }
  ret <4 x i32> %r
}
=>
define <4 x i32> @add_const(<4 x i32> %v) {
%0:
  %1 = add <4 x i32> %v, { 44, 41, 42, 43 }
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 1, 2, 3, 0
  ret <4 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @sub_const(<4 x i32> %v) {
%0:
  %t1 = shufflevector <4 x i32> %v, <4 x i32> undef, 3, 2, 1, 0
  %r = sub <4 x i32> { 41, 42, 43, 44 }, %t1
  ret <4 x i32> %r
}
=>
define <4 x i32> @sub_const(<4 x i32> %v) {
%0:
  %1 = sub <4 x i32> { 44, 43, 42, 41 }, %v
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 3, 2, 1, 0
  ret <4 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fadd_const_multiuse(<2 x float> %v) {
%0:
  %t1 = shufflevector <2 x float> %v, <2 x float> undef, 1, 0
  %r = fadd <2 x float> %t1, { 41.000000, 42.000000 }
  call void @use(<2 x float> %t1)
  ret <2 x float> %r
}
=>
define <2 x float> @fadd_const_multiuse(<2 x float> %v) {
%0:
  %t1 = shufflevector <2 x float> %v, <2 x float> undef, 1, 0
  %r = fadd <2 x float> %t1, { 41.000000, 42.000000 }
  call void @use(<2 x float> %t1)
  ret <2 x float> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @mul_const_splat(<4 x i32> %v) {
%0:
  %t1 = shufflevector <4 x i32> %v, <4 x i32> undef, 1, 1, 1, 1
  %r = mul <4 x i32> { 42, 42, 42, 42 }, %t1
  ret <4 x i32> %r
}
=>
define <4 x i32> @mul_const_splat(<4 x i32> %v) {
%0:
  %1 = mul <4 x i32> %v, { undef, 42, undef, undef }
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 1, 1, 1, 1
  ret <4 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @lshr_const_half_splat(<4 x i32> %v) {
%0:
  %t1 = shufflevector <4 x i32> %v, <4 x i32> undef, 1, 1, 2, 2
  %r = lshr <4 x i32> { 8, 8, 9, 9 }, %t1
  ret <4 x i32> %r
}
=>
define <4 x i32> @lshr_const_half_splat(<4 x i32> %v) {
%0:
  %1 = lshr <4 x i32> { undef, 8, 9, undef }, %v
  %r = shufflevector <4 x i32> %1, <4 x i32> undef, 1, 1, 2, 2
  ret <4 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fmul_const_invalid_constant(<2 x float> %v) {
%0:
  %t1 = shufflevector <2 x float> %v, <2 x float> undef, 0, 0
  %r = fmul <2 x float> %t1, { 41.000000, 42.000000 }
  ret <2 x float> %r
}
=>
define <2 x float> @fmul_const_invalid_constant(<2 x float> %v) {
%0:
  %t1 = shufflevector <2 x float> %v, <2 x float> undef, 0, 0
  %r = fmul <2 x float> %t1, { 41.000000, 42.000000 }
  ret <2 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @widening_shuffle_add_1(<2 x i8> %x) {
%0:
  %widex = shufflevector <2 x i8> %x, <2 x i8> undef, 0, 1, 4294967295, 4294967295
  %r = add <4 x i8> %widex, { 42, 43, 44, 45 }
  ret <4 x i8> %r
}
=>
define <4 x i8> @widening_shuffle_add_1(<2 x i8> %x) {
%0:
  %1 = add <2 x i8> %x, { 42, 43 }
  %r = shufflevector <2 x i8> %1, <2 x i8> undef, 0, 1, 4294967295, 4294967295
  ret <4 x i8> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @widening_shuffle_add_2(<2 x i8> %x) {
%0:
  %widex = shufflevector <2 x i8> %x, <2 x i8> undef, 1, 0, 4294967295, 4294967295
  %r = add <4 x i8> %widex, { 42, 43, 44, 45 }
  ret <4 x i8> %r
}
=>
define <4 x i8> @widening_shuffle_add_2(<2 x i8> %x) {
%0:
  %1 = add <2 x i8> %x, { 43, 42 }
  %r = shufflevector <2 x i8> %1, <2 x i8> undef, 1, 0, 4294967295, 4294967295
  ret <4 x i8> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @widening_shuffle_add_invalid_constant(<2 x i8> %x) {
%0:
  %widex = shufflevector <2 x i8> %x, <2 x i8> undef, 1, 1, 4294967295, 4294967295
  %r = add <4 x i8> %widex, { 42, 43, 44, 45 }
  ret <4 x i8> %r
}
=>
define <4 x i8> @widening_shuffle_add_invalid_constant(<2 x i8> %x) {
%0:
  %widex = shufflevector <2 x i8> %x, <2 x i8> undef, 1, 1, 4294967295, 4294967295
  %r = add <4 x i8> %widex, { 42, 43, 44, 45 }
  ret <4 x i8> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @widening_shuffle_add_invalid_mask(<2 x i8> %x) {
%0:
  %widex = shufflevector <2 x i8> %x, <2 x i8> undef, 0, 1, 4294967295, 0
  %r = add <4 x i8> %widex, { 42, 43, 44, 45 }
  ret <4 x i8> %r
}
=>
define <4 x i8> @widening_shuffle_add_invalid_mask(<2 x i8> %x) {
%0:
  %widex = shufflevector <2 x i8> %x, <2 x i8> undef, 0, 1, 4294967295, 0
  %r = add <4 x i8> %widex, { 42, 43, 44, 45 }
  ret <4 x i8> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @widening_shuffle_shl_constant_op0(<2 x i16> %v) {
%0:
  %shuf = shufflevector <2 x i16> %v, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  %bo = shl <4 x i16> { 42, 65494, 65535, 65535 }, %shuf
  ret <4 x i16> %bo
}
=>
define <4 x i16> @widening_shuffle_shl_constant_op0(<2 x i16> %v) {
%0:
  %1 = shl <2 x i16> { 42, 65494 }, %v
  %bo = shufflevector <2 x i16> %1, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  ret <4 x i16> %bo
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @widening_shuffle_shl_constant_op1(<2 x i16> %v) {
%0:
  %shuf = shufflevector <2 x i16> %v, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  %bo = shl <4 x i16> %shuf, { 2, 4, 0, 0 }
  ret <4 x i16> %bo
}
=>
define <4 x i16> @widening_shuffle_shl_constant_op1(<2 x i16> %v) {
%0:
  %1 = shl <2 x i16> %v, { 2, 4 }
  %bo = shufflevector <2 x i16> %1, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  ret <4 x i16> %bo
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @widening_shuffle_shl_constant_op1_non0(<2 x i16> %v) {
%0:
  %shuf = shufflevector <2 x i16> %v, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  %bo = shl <4 x i16> %shuf, { 2, 4, 1, 2 }
  ret <4 x i16> %bo
}
=>
define <4 x i16> @widening_shuffle_shl_constant_op1_non0(<2 x i16> %v) {
%0:
  %shuf = shufflevector <2 x i16> %v, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  %bo = shl <4 x i16> %shuf, { 2, 4, 1, 2 }
  ret <4 x i16> %bo
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @widening_shuffle_or(<2 x i16> %v) {
%0:
  %shuf = shufflevector <2 x i16> %v, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  %bo = or <4 x i16> %shuf, { 42, 65494, 65535, 65535 }
  ret <4 x i16> %bo
}
=>
define <4 x i16> @widening_shuffle_or(<2 x i16> %v) {
%0:
  %shuf = shufflevector <2 x i16> %v, <2 x i16> undef, 0, 1, 4294967295, 4294967295
  %bo = or <4 x i16> %shuf, { 42, 65494, 65535, 65535 }
  ret <4 x i16> %bo
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @shuffle_17add2(<4 x i32> %v) {
%0:
  %t1 = shufflevector <4 x i32> %v, <4 x i32> { 0, 0, 0, 0 }, 3, 2, 1, 0
  %t2 = add <4 x i32> %t1, %t1
  %r = shufflevector <4 x i32> %t2, <4 x i32> { 0, 0, 0, 0 }, 3, 2, 1, 0
  ret <4 x i32> %r
}
=>
define <4 x i32> @shuffle_17add2(<4 x i32> %v) {
%0:
  %1 = shl <4 x i32> %v, { 1, 1, 1, 1 }
  ret <4 x i32> %1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @shuffle_17mulsplat(<4 x i32> %v) {
%0:
  %s1 = shufflevector <4 x i32> %v, <4 x i32> { 0, 0, 0, 0 }, 0, 0, 0, 0
  %m1 = mul <4 x i32> %s1, %s1
  %s2 = shufflevector <4 x i32> %m1, <4 x i32> { 0, 0, 0, 0 }, 1, 1, 1, 1
  ret <4 x i32> %s2
}
=>
define <4 x i32> @shuffle_17mulsplat(<4 x i32> %v) {
%0:
  %1 = mul <4 x i32> %v, %v
  %m1 = shufflevector <4 x i32> %1, <4 x i32> undef, 0, 0, 0, 0
  ret <4 x i32> %m1
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @pr19717(<4 x i32> %in0, <2 x i32> %in1) {
%0:
  %shuffle = shufflevector <4 x i32> %in0, <4 x i32> %in0, 0, 0
  %shuffle4 = shufflevector <2 x i32> %in1, <2 x i32> %in1, 0, 0
  %mul = mul <2 x i32> %shuffle, %shuffle4
  ret <2 x i32> %mul
}
=>
define <2 x i32> @pr19717(<4 x i32> %in0, <2 x i32> %in1) {
%0:
  %shuffle = shufflevector <4 x i32> %in0, <4 x i32> undef, 0, 0
  %shuffle4 = shufflevector <2 x i32> %in1, <2 x i32> undef, 0, 0
  %mul = mul <2 x i32> %shuffle, %shuffle4
  ret <2 x i32> %mul
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @pr19717a(<8 x i16> %in0, <8 x i16> %in1) {
%0:
  %shuffle = shufflevector <8 x i16> %in0, <8 x i16> %in0, 5, 5, 5, 5
  %shuffle1 = shufflevector <8 x i16> %in1, <8 x i16> %in1, 5, 5, 5, 5
  %mul = mul <4 x i16> %shuffle, %shuffle1
  ret <4 x i16> %mul
}
=>
define <4 x i16> @pr19717a(<8 x i16> %in0, <8 x i16> %in1) {
%0:
  %1 = mul <8 x i16> %in0, %in1
  %mul = shufflevector <8 x i16> %1, <8 x i16> undef, 5, 5, 5, 5
  ret <4 x i16> %mul
}
Transformation seems to be correct!


----------------------------------------
define <8 x i8> @pr19730(<16 x i8> %in0) {
%0:
  %shuffle = shufflevector <16 x i8> %in0, <16 x i8> undef, 7, 6, 5, 4, 3, 2, 1, 0
  %shuffle1 = shufflevector <8 x i8> %shuffle, <8 x i8> undef, 7, 6, 5, 4, 3, 2, 1, 0
  ret <8 x i8> %shuffle1
}
=>
define <8 x i8> @pr19730(<16 x i8> %in0) {
%0:
  %shuffle = shufflevector <16 x i8> %in0, <16 x i8> undef, 7, 6, 5, 4, 3, 2, 1, 0
  %shuffle1 = shufflevector <8 x i8> %shuffle, <8 x i8> undef, 7, 6, 5, 4, 3, 2, 1, 0
  ret <8 x i8> %shuffle1
}
Transformation seems to be correct!


----------------------------------------
define i32 @pr19737(<4 x i32> %in0) {
%0:
  %shuffle.i = shufflevector <4 x i32> { 0, 0, 0, 0 }, <4 x i32> %in0, 0, 4, 2, 6
  %neg.i = xor <4 x i32> %shuffle.i, { 4294967295, 4294967295, 4294967295, 4294967295 }
  %and.i = and <4 x i32> %in0, %neg.i
  %rv = extractelement <4 x i32> %and.i, i32 0
  ret i32 %rv
}
=>
define i32 @pr19737(<4 x i32> %in0) {
%0:
  %rv = extractelement <4 x i32> %in0, i32 0
  ret i32 %rv
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @pr20059(<4 x i32> %p1, <4 x i32> %p2) {
%0:
  %splat1 = shufflevector <4 x i32> %p1, <4 x i32> undef, 0, 0, 0, 0
  %splat2 = shufflevector <4 x i32> %p2, <4 x i32> undef, 0, 0, 0, 0
  %retval = srem <4 x i32> %splat1, %splat2
  ret <4 x i32> %retval
}
=>
define <4 x i32> @pr20059(<4 x i32> %p1, <4 x i32> %p2) {
%0:
  %splat1 = shufflevector <4 x i32> %p1, <4 x i32> undef, 0, 0, 0, 0
  %splat2 = shufflevector <4 x i32> %p2, <4 x i32> undef, 0, 0, 0, 0
  %retval = srem <4 x i32> %splat1, %splat2
  ret <4 x i32> %retval
}
Transformation doesn't verify!
ERROR: Timeout

ERROR: Unsupported instruction:   %__constexpr_1 = ptrtoint <4 x i32> (<4 x i32>)* @pr20114 to i64
ERROR: Unsupported instruction:   %__constexpr_0 = bitcast <2 x i64> <i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64), i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64)> to <4 x i32>
ERROR: Unsupported instruction:   %masked_new.i.i.i = and <4 x i32> bitcast (<2 x i64> <i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64), i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64)> to <4 x i32>), %mask01.i
ERROR: Unsupported instruction:   %__constexpr_1 = ptrtoint <4 x i32> (<4 x i32>)* @pr20114 to i64
ERROR: Unsupported instruction:   %__constexpr_0 = bitcast <2 x i64> <i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64), i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64)> to <4 x i32>
ERROR: Unsupported instruction:   %masked_new.i.i.i = and <4 x i32> %mask01.i, bitcast (<2 x i64> <i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64), i64 ptrtoint (<4 x i32> (<4 x i32>)* @pr20114 to i64)> to <4 x i32>)

----------------------------------------
define <2 x *> @pr23113(<4 x *> %A) {
%0:
  %1 = shufflevector <4 x *> %A, <4 x *> undef, 0, 1
  ret <2 x *> %1
}
=>
define <2 x *> @pr23113(<4 x *> %A) {
%0:
  %1 = shufflevector <4 x *> %A, <4 x *> undef, 0, 1
  ret <2 x *> %1
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @PR37648(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = urem <2 x i32> %splat, { 1, 1 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @PR37648(<2 x i32> %x) {
%0:
  ret <2 x i32> { 0, 0 }
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @add_splat_constant(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = add <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @add_splat_constant(<2 x i32> %x) {
%0:
  %1 = add <2 x i32> %x, { 42, undef }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @sub_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = sub <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @sub_splat_constant0(<2 x i32> %x) {
%0:
  %1 = sub <2 x i32> { 42, undef }, %x
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @sub_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = sub <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @sub_splat_constant1(<2 x i32> %x) {
%0:
  %1 = add <2 x i32> %x, { 4294967254, undef }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @mul_splat_constant(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = mul <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @mul_splat_constant(<2 x i32> %x) {
%0:
  %1 = mul <2 x i32> %x, { 42, undef }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @shl_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = shl <2 x i32> { 5, 5 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @shl_splat_constant0(<2 x i32> %x) {
%0:
  %1 = shl <2 x i32> { 5, undef }, %x
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @shl_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = shl <2 x i32> %splat, { 5, 5 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @shl_splat_constant1(<2 x i32> %x) {
%0:
  %1 = shl <2 x i32> %x, { 5, 0 }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @ashr_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = ashr <2 x i32> { 5, 5 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @ashr_splat_constant0(<2 x i32> %x) {
%0:
  %1 = ashr <2 x i32> { 5, undef }, %x
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @ashr_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = ashr <2 x i32> %splat, { 5, 5 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @ashr_splat_constant1(<2 x i32> %x) {
%0:
  %1 = ashr <2 x i32> %x, { 5, 0 }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @lshr_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = lshr <2 x i32> { 5, 5 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @lshr_splat_constant0(<2 x i32> %x) {
%0:
  %1 = lshr <2 x i32> { 5, undef }, %x
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @lshr_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = lshr <2 x i32> %splat, { 5, 5 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @lshr_splat_constant1(<2 x i32> %x) {
%0:
  %1 = lshr <2 x i32> %x, { 5, 0 }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @urem_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = urem <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @urem_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = urem <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @urem_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = urem <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @urem_splat_constant1(<2 x i32> %x) {
%0:
  %1 = urem <2 x i32> %x, { 42, 1 }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @srem_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = srem <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @srem_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = srem <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @srem_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = srem <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @srem_splat_constant1(<2 x i32> %x) {
%0:
  %1 = srem <2 x i32> %x, { 42, 1 }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @udiv_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = udiv <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @udiv_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = udiv <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @udiv_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = udiv <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @udiv_splat_constant1(<2 x i32> %x) {
%0:
  %1 = udiv <2 x i32> %x, { 42, 1 }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @sdiv_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = sdiv <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
=>
define <2 x i32> @sdiv_splat_constant0(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = sdiv <2 x i32> { 42, 42 }, %splat
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @sdiv_splat_constant1(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = sdiv <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @sdiv_splat_constant1(<2 x i32> %x) {
%0:
  %1 = sdiv <2 x i32> %x, { 42, 1 }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_splat_constant(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = and <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @and_splat_constant(<2 x i32> %x) {
%0:
  %1 = and <2 x i32> %x, { 42, undef }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @and_constant_mask_undef(<4 x i16> %add) {
%entry:
  %shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  %and = and <4 x i16> %shuffle, { 0, 0, 65535, 65535 }
  ret <4 x i16> %and
}
=>
define <4 x i16> @and_constant_mask_undef(<4 x i16> %add) {
%entry:
  %shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  %and = and <4 x i16> %shuffle, { 0, 0, 65535, 65535 }
  ret <4 x i16> %and
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @and_constant_mask_undef_2(<4 x i16> %add) {
%entry:
  %shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, 1, 1, 1, 4294967295
  %and = and <4 x i16> %shuffle, { 65535, 65535, 65535, 0 }
  ret <4 x i16> %and
}
=>
define <4 x i16> @and_constant_mask_undef_2(<4 x i16> %add) {
%entry:
  %shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, 1, 1, 1, 4294967295
  %and = and <4 x i16> %shuffle, { 65535, 65535, 65535, 0 }
  ret <4 x i16> %and
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @and_constant_mask_undef_3(<4 x i16> %add) {
%entry:
  %shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, 0, 1, 1, 4294967295
  %and = and <4 x i16> %shuffle, { 0, 0, 0, 65535 }
  ret <4 x i16> %and
}
=>
define <4 x i16> @and_constant_mask_undef_3(<4 x i16> %add) {
%entry:
  ret <4 x i16> { 0, 0, 0, undef }
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @and_constant_mask_undef_4(<4 x i16> %add) {
%entry:
  %shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, 0, 1, 1, 4294967295
  %and = and <4 x i16> %shuffle, { 9, 20, 20, 65535 }
  ret <4 x i16> %and
}
=>
define <4 x i16> @and_constant_mask_undef_4(<4 x i16> %add) {
%entry:
  %0 = and <4 x i16> %add, { 9, 20, undef, undef }
  %and = shufflevector <4 x i16> %0, <4 x i16> undef, 0, 1, 1, 4294967295
  ret <4 x i16> %and
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @and_constant_mask_not_undef(<4 x i16> %add) {
%entry:
  %shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, 2, 3, 1, 1
  %and = and <4 x i16> %shuffle, { 0, 0, 65535, 65535 }
  ret <4 x i16> %and
}
=>
define <4 x i16> @and_constant_mask_not_undef(<4 x i16> %add) {
%entry:
  %0 = and <4 x i16> %add, { undef, 65535, 0, 0 }
  %and = shufflevector <4 x i16> %0, <4 x i16> undef, 2, 3, 1, 1
  ret <4 x i16> %and
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @or_constant_mask_undef(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  %or = or <4 x i16> %shuffle, { 65535, 65535, 0, 0 }
  ret <4 x i16> %or
}
=>
define <4 x i16> @or_constant_mask_undef(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  %or = or <4 x i16> %shuffle, { 65535, 65535, 0, 0 }
  ret <4 x i16> %or
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @or_constant_mask_undef_2(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 1, 1, 4294967295
  %or = or <4 x i16> %shuffle, { 65535, 0, 0, 65535 }
  ret <4 x i16> %or
}
=>
define <4 x i16> @or_constant_mask_undef_2(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 1, 1, 4294967295
  %or = or <4 x i16> %shuffle, { 65535, 0, 0, 65535 }
  ret <4 x i16> %or
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @or_constant_mask_undef_3(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 1, 1, 4294967295
  %or = or <4 x i16> %shuffle, { 0, 65535, 65535, 0 }
  ret <4 x i16> %or
}
=>
define <4 x i16> @or_constant_mask_undef_3(<4 x i16> %in) {
%entry:
  ret <4 x i16> { undef, 65535, 65535, undef }
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @or_constant_mask_undef_4(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 1, 1, 4294967295
  %or = or <4 x i16> %shuffle, { 0, 99, 99, 0 }
  ret <4 x i16> %or
}
=>
define <4 x i16> @or_constant_mask_undef_4(<4 x i16> %in) {
%entry:
  %0 = or <4 x i16> %in, { undef, 99, undef, undef }
  %or = shufflevector <4 x i16> %0, <4 x i16> undef, 4294967295, 1, 1, 4294967295
  ret <4 x i16> %or
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @or_constant_mask_not_undef(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 2, 3, 1, 1
  %and = or <4 x i16> %shuffle, { 0, 0, 65535, 65535 }
  ret <4 x i16> %and
}
=>
define <4 x i16> @or_constant_mask_not_undef(<4 x i16> %in) {
%entry:
  %0 = or <4 x i16> %in, { undef, 65535, 0, 0 }
  %and = shufflevector <4 x i16> %0, <4 x i16> undef, 2, 3, 1, 1
  ret <4 x i16> %and
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @shl_constant_mask_undef(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 0, 4294967295, 1, 1
  %shl = shl <4 x i16> %shuffle, { 10, 3, 0, 0 }
  ret <4 x i16> %shl
}
=>
define <4 x i16> @shl_constant_mask_undef(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 0, 4294967295, 1, 1
  %shl = shl <4 x i16> %shuffle, { 10, 3, 0, 0 }
  ret <4 x i16> %shl
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @add_constant_mask_undef(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  %add = add <4 x i16> %shuffle, { 10, 3, 0, 0 }
  ret <4 x i16> %add
}
=>
define <4 x i16> @add_constant_mask_undef(<4 x i16> %in) {
%entry:
  %add = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  ret <4 x i16> %add
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @add_constant_mask_undef_2(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 2, 1, 1
  %add = add <4 x i16> %shuffle, { 10, 3, 0, 0 }
  ret <4 x i16> %add
}
=>
define <4 x i16> @add_constant_mask_undef_2(<4 x i16> %in) {
%entry:
  %0 = add <4 x i16> %in, { undef, 0, 3, undef }
  %add = shufflevector <4 x i16> %0, <4 x i16> undef, 4294967295, 2, 1, 1
  ret <4 x i16> %add
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @sub_constant_mask_undef(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  %sub = sub <4 x i16> %shuffle, { 10, 3, 0, 0 }
  ret <4 x i16> %sub
}
=>
define <4 x i16> @sub_constant_mask_undef(<4 x i16> %in) {
%entry:
  %sub = shufflevector <4 x i16> %in, <4 x i16> undef, 4294967295, 4294967295, 1, 1
  ret <4 x i16> %sub
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @sub_constant_mask_undef_2(<4 x i16> %in) {
%entry:
  %shuffle = shufflevector <4 x i16> %in, <4 x i16> undef, 1, 1, 2, 4294967295
  %sub = sub <4 x i16> %shuffle, { 0, 0, 10, 99 }
  ret <4 x i16> %sub
}
=>
define <4 x i16> @sub_constant_mask_undef_2(<4 x i16> %in) {
%entry:
  %0 = add <4 x i16> %in, { undef, 0, 65526, undef }
  %sub = shufflevector <4 x i16> %0, <4 x i16> undef, 1, 1, 2, 4294967295
  ret <4 x i16> %sub
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @or_splat_constant(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = or <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @or_splat_constant(<2 x i32> %x) {
%0:
  %1 = or <2 x i32> %x, { 42, undef }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @xor_splat_constant(<2 x i32> %x) {
%0:
  %splat = shufflevector <2 x i32> %x, <2 x i32> undef, 0, 0
  %r = xor <2 x i32> %splat, { 42, 42 }
  ret <2 x i32> %r
}
=>
define <2 x i32> @xor_splat_constant(<2 x i32> %x) {
%0:
  %1 = xor <2 x i32> %x, { 42, undef }
  %r = shufflevector <2 x i32> %1, <2 x i32> undef, 0, 0
  ret <2 x i32> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fadd_splat_constant(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = fadd <2 x float> %splat, { 42.000000, 42.000000 }
  ret <2 x float> %r
}
=>
define <2 x float> @fadd_splat_constant(<2 x float> %x) {
%0:
  %1 = fadd <2 x float> %x, { 42.000000, undef }
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fsub_splat_constant0(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = fsub <2 x float> { 42.000000, 42.000000 }, %splat
  ret <2 x float> %r
}
=>
define <2 x float> @fsub_splat_constant0(<2 x float> %x) {
%0:
  %1 = fsub <2 x float> { 42.000000, undef }, %x
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fsub_splat_constant1(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = fsub <2 x float> %splat, { 42.000000, 42.000000 }
  ret <2 x float> %r
}
=>
define <2 x float> @fsub_splat_constant1(<2 x float> %x) {
%0:
  %1 = fadd <2 x float> %x, { -42.000000, undef }
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fneg(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = fsub <2 x float> { -0.000000, -0.000000 }, %splat
  ret <2 x float> %r
}
=>
define <2 x float> @fneg(<2 x float> %x) {
%0:
  %1 = fneg <2 x float> %x
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fmul_splat_constant(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = fmul <2 x float> %splat, { 42.000000, 42.000000 }
  ret <2 x float> %r
}
=>
define <2 x float> @fmul_splat_constant(<2 x float> %x) {
%0:
  %1 = fmul <2 x float> %x, { 42.000000, undef }
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @fdiv_splat_constant0(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = fdiv <2 x float> { 42.000000, 42.000000 }, %splat
  ret <2 x float> %r
}
=>
define <2 x float> @fdiv_splat_constant0(<2 x float> %x) {
%0:
  %1 = fdiv <2 x float> { 42.000000, undef }, %x
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <2 x float> @fdiv_splat_constant1(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = fdiv <2 x float> %splat, { 42.000000, 42.000000 }
  ret <2 x float> %r
}
=>
define <2 x float> @fdiv_splat_constant1(<2 x float> %x) {
%0:
  %1 = fdiv <2 x float> %x, { 42.000000, undef }
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x float> @frem_splat_constant0(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = frem <2 x float> { 42.000000, 42.000000 }, %splat
  ret <2 x float> %r
}
=>
define <2 x float> @frem_splat_constant0(<2 x float> %x) {
%0:
  %1 = frem <2 x float> { 42.000000, undef }, %x
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation doesn't verify!
ERROR: Invalid expr


----------------------------------------
define <2 x float> @frem_splat_constant1(<2 x float> %x) {
%0:
  %splat = shufflevector <2 x float> %x, <2 x float> undef, 0, 0
  %r = frem <2 x float> %splat, { 42.000000, 42.000000 }
  ret <2 x float> %r
}
=>
define <2 x float> @frem_splat_constant1(<2 x float> %x) {
%0:
  %1 = frem <2 x float> %x, { 42.000000, undef }
  %r = shufflevector <2 x float> %1, <2 x float> undef, 0, 0
  ret <2 x float> %r
}
Transformation doesn't verify!
ERROR: Invalid expr


----------------------------------------
define <2 x i1> @PR40734(<1 x i1> %x, <4 x i1> %y) {
%0:
  %widen = shufflevector <1 x i1> { 0 }, <1 x i1> %x, 0, 1
  %narrow = shufflevector <4 x i1> %y, <4 x i1> undef, 0, 1
  %r = and <2 x i1> %widen, %narrow
  ret <2 x i1> %r
}
=>
define <2 x i1> @PR40734(<1 x i1> %x, <4 x i1> %y) {
%0:
  %widen = shufflevector <1 x i1> { 0 }, <1 x i1> %x, 0, 1
  %narrow = shufflevector <4 x i1> %y, <4 x i1> undef, 0, 1
  %r = and <2 x i1> %widen, %narrow
  ret <2 x i1> %r
}
Transformation seems to be correct!


----------------------------------------
define <7 x i8> @insert_subvector_shuffles(<3 x i8> %x, <3 x i8> %y) {
%0:
  %s1 = shufflevector <3 x i8> %x, <3 x i8> undef, 0, 1, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s2 = shufflevector <3 x i8> %y, <3 x i8> undef, 4294967295, 1, 2, 4294967295, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <7 x i8> %s1, <7 x i8> %s2, 0, 8, 1, 4294967295, 8, 1, 9
  ret <7 x i8> %s3
}
=>
define <7 x i8> @insert_subvector_shuffles(<3 x i8> %x, <3 x i8> %y) {
%0:
  %s1 = shufflevector <3 x i8> %x, <3 x i8> undef, 0, 1, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s2 = shufflevector <3 x i8> %y, <3 x i8> undef, 4294967295, 1, 2, 4294967295, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <7 x i8> %s1, <7 x i8> %s2, 0, 8, 1, 4294967295, 8, 1, 9
  ret <7 x i8> %s3
}
Transformation seems to be correct!


----------------------------------------
define <8 x i8> @insert_subvector_shuffles_pow2elts(<2 x i8> %x, <2 x i8> %y) {
%0:
  %s1 = shufflevector <2 x i8> %x, <2 x i8> undef, 0, 1, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s2 = shufflevector <2 x i8> %y, <2 x i8> undef, 0, 1, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <8 x i8> %s1, <8 x i8> %s2, 0, 8, 1, 4294967295, 8, 1, 9, 0
  ret <8 x i8> %s3
}
=>
define <8 x i8> @insert_subvector_shuffles_pow2elts(<2 x i8> %x, <2 x i8> %y) {
%0:
  %s3 = shufflevector <2 x i8> %x, <2 x i8> %y, 0, 2, 1, 4294967295, 2, 1, 3, 0
  ret <8 x i8> %s3
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @insert_subvector_shuffles_narrowing(<3 x i8> %x, <3 x i8> %y) {
%0:
  %s1 = shufflevector <3 x i8> %x, <3 x i8> undef, 0, 1, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s2 = shufflevector <3 x i8> %y, <3 x i8> undef, 4294967295, 1, 2, 4294967295, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <7 x i8> %s1, <7 x i8> %s2, 0, 8
  ret <2 x i8> %s3
}
=>
define <2 x i8> @insert_subvector_shuffles_narrowing(<3 x i8> %x, <3 x i8> %y) {
%0:
  %s1 = shufflevector <3 x i8> %x, <3 x i8> undef, 0, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s2 = shufflevector <3 x i8> %y, <3 x i8> undef, 4294967295, 1, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <7 x i8> %s1, <7 x i8> %s2, 0, 8
  ret <2 x i8> %s3
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @insert_subvector_shuffles_narrowing_pow2elts(<4 x i8> %x, <4 x i8> %y) {
%0:
  %s1 = shufflevector <4 x i8> %x, <4 x i8> undef, 0, 1, 2, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295
  %s2 = shufflevector <4 x i8> %y, <4 x i8> undef, 0, 1, 4294967295, 3, 4294967295, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <8 x i8> %s1, <8 x i8> %s2, 0, 8
  ret <2 x i8> %s3
}
=>
define <2 x i8> @insert_subvector_shuffles_narrowing_pow2elts(<4 x i8> %x, <4 x i8> %y) {
%0:
  %s3 = shufflevector <4 x i8> %x, <4 x i8> %y, 0, 4
  ret <2 x i8> %s3
}
Transformation seems to be correct!


----------------------------------------
define <4 x double> @insert_subvector_shuffles_identity(<2 x double> %x) {
%0:
  %s1 = shufflevector <2 x double> %x, <2 x double> undef, 4294967295, 1, 4294967295, 4294967295
  %s2 = shufflevector <2 x double> %x, <2 x double> undef, 0, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <4 x double> %s2, <4 x double> %s1, 0, 5, 4294967295, 4294967295
  ret <4 x double> %s3
}
=>
define <4 x double> @insert_subvector_shuffles_identity(<2 x double> %x) {
%0:
  %s3 = shufflevector <2 x double> %x, <2 x double> undef, 0, 1, 4294967295, 4294967295
  ret <4 x double> %s3
}
Transformation seems to be correct!


----------------------------------------
define <4 x double> @not_insert_subvector_shuffle(<2 x double> %x) {
%0:
  %s1 = shufflevector <2 x double> %x, <2 x double> undef, 4294967295, 1, 4294967295, 1
  %s2 = shufflevector <2 x double> %x, <2 x double> undef, 0, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <4 x double> %s2, <4 x double> %s1, 0, 5, 7, 4294967295
  ret <4 x double> %s3
}
=>
define <4 x double> @not_insert_subvector_shuffle(<2 x double> %x) {
%0:
  %s1 = shufflevector <2 x double> %x, <2 x double> undef, 4294967295, 1, 4294967295, 1
  %s2 = shufflevector <2 x double> %x, <2 x double> undef, 0, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <4 x double> %s2, <4 x double> %s1, 0, 5, 7, 4294967295
  ret <4 x double> %s3
}
Transformation seems to be correct!


----------------------------------------
define <4 x double> @not_insert_subvector_shuffles_with_same_size(<2 x double> %x, <3 x double> %y) {
%0:
  %s1 = shufflevector <2 x double> %x, <2 x double> undef, 4294967295, 1, 4294967295, 4294967295
  %s2 = shufflevector <3 x double> %y, <3 x double> undef, 0, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <4 x double> %s2, <4 x double> %s1, 0, 5, 4294967295, 4294967295
  ret <4 x double> %s3
}
=>
define <4 x double> @not_insert_subvector_shuffles_with_same_size(<2 x double> %x, <3 x double> %y) {
%0:
  %s1 = shufflevector <2 x double> %x, <2 x double> undef, 4294967295, 1, 4294967295, 4294967295
  %s2 = shufflevector <3 x double> %y, <3 x double> undef, 0, 4294967295, 4294967295, 4294967295
  %s3 = shufflevector <4 x double> %s2, <4 x double> %s1, 0, 5, 4294967295, 4294967295
  ret <4 x double> %s3
}
Transformation seems to be correct!


----------------------------------------
define <4 x float> @insert_subvector_crash_invalid_mask_elt(<2 x float> %x, * %p) {
%0:
  %widen = shufflevector <2 x float> %x, <2 x float> undef, 0, 1, 4294967295, 4294967295
  %ext2 = extractelement <2 x float> %x, i32 0
  %I = insertelement <4 x float> %widen, float %ext2, i16 0
  store <4 x float> %I, * %p, align 16
  ret <4 x float> %widen
}
=>
define <4 x float> @insert_subvector_crash_invalid_mask_elt(<2 x float> %x, * %p) {
%0:
  %widen = shufflevector <2 x float> %x, <2 x float> undef, 0, 1, 4294967295, 4294967295
  %I = shufflevector <2 x float> %x, <2 x float> undef, 0, 1, 4294967295, 4294967295
  store <4 x float> %I, * %p, align 16
  ret <4 x float> %widen
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @splat_assoc_add(<4 x i32> %x, <4 x i32> %y) {
%0:
  %splatx = shufflevector <4 x i32> %x, <4 x i32> undef, 0, 0, 0, 0
  %a = add <4 x i32> %y, { 317426, 317426, 317426, 317426 }
  %r = add <4 x i32> %splatx, %a
  ret <4 x i32> %r
}
=>
define <4 x i32> @splat_assoc_add(<4 x i32> %x, <4 x i32> %y) {
%0:
  %1 = add <4 x i32> %x, { 317426, undef, undef, undef }
  %2 = shufflevector <4 x i32> %1, <4 x i32> undef, 0, 0, 0, 0
  %r = add <4 x i32> %2, %y
  ret <4 x i32> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @splat_assoc_add_undef_mask_elts(<4 x i32> %x, <4 x i32> %y) {
%0:
  %splatx = shufflevector <4 x i32> %x, <4 x i32> undef, 0, 0, 4294967295, 4294967295
  %a = add <4 x i32> %y, { 42, 42, 42, 42 }
  %r = add <4 x i32> %splatx, %a
  ret <4 x i32> %r
}
=>
define <4 x i32> @splat_assoc_add_undef_mask_elts(<4 x i32> %x, <4 x i32> %y) {
%0:
  %1 = add <4 x i32> %x, { 42, undef, undef, undef }
  %2 = shufflevector <4 x i32> %1, <4 x i32> undef, 0, 0, 0, 0
  %r = add <4 x i32> %2, %y
  ret <4 x i32> %r
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
<4 x i32> %x = < poison, poison, poison, poison >
<4 x i32> %y = < undef, undef, undef, undef >

Source:
<4 x i32> %splatx = < poison, poison, undef, undef >
<4 x i32> %a = < undef, undef, undef, undef >
<4 x i32> %r = < poison, poison, undef, undef >

Target:
<4 x i32> %1 = < poison, poison, poison, poison >
<4 x i32> %2 = < poison, poison, poison, poison >
<4 x i32> %r = < poison, poison, poison, poison >
Source value: < poison, poison, undef, undef >
Target value: < poison, poison, poison, poison >


------------------- SMT STATS -------------------
Num queries: 261
Num invalid: 3
Num skips:   0
Num trivial: 317 (54.8%)
Num timeout: 12 (4.6%)
Num errors:  0 (0.0%)
Num SAT:     118 (45.2%)
Num UNSAT:   131 (50.2%)

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/scripts/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/vec_shuffle.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/InstCombine/vec_shuffle.ll

 

<-- Back