]> granicus.if.org Git - llvm/commitdiff
[X86][AVX] Add PR34359 shuffle test case.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 12 Jul 2019 17:42:32 +0000 (17:42 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 12 Jul 2019 17:42:32 +0000 (17:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365926 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/vector-shuffle-256-v4.ll

index 3603407f2b1c2ceb1cb9b99ebc5d30f25a0b1e05..8fc0eabbcd2a055a2ef27db4c0b67ef378a542dd 100644 (file)
@@ -752,6 +752,18 @@ define <4 x double> @shuffle_v4f64_1032_v2f64(<2 x double> %a, <2 x double> %b)
   ret <4 x double> %3
 }
 
+;PR34359
+define <4 x double> @shuffle_v4f64_2345_0567_select(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
+; ALL-LABEL: shuffle_v4f64_2345_0567_select:
+; ALL:       # %bb.0:
+; ALL-NEXT:    vperm2f128 {{.*#+}} ymm0 = ymm0[2,3],ymm1[0,1]
+; ALL-NEXT:    vblendps {{.*#+}} ymm0 = ymm2[0,1],ymm0[2,3,4,5,6,7]
+; ALL-NEXT:    retq
+  %shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 2, i32 3, i32 4, i32 5>
+  %res = select <4 x i1> <i1 0, i1 1, i1 1, i1 1>, <4 x double> %shuf, <4 x double> %vec3
+  ret <4 x double> %res
+}
+
 define <4 x i64> @shuffle_v4i64_0000(<4 x i64> %a, <4 x i64> %b) {
 ; AVX1-LABEL: shuffle_v4i64_0000:
 ; AVX1:       # %bb.0: