xref: /llvm-project/llvm/test/CodeGen/X86/lower-vec-shuffle-bug.ll (revision 25528d6de70e98683722e28655d8568d5f09b5c7)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s
3
4define <4 x double> @test1(<4 x double> %A, <4 x double> %B) {
5; CHECK-LABEL: test1:
6; CHECK:       # %bb.0: # %entry
7; CHECK-NEXT:    vinsertf128 $1, %xmm1, %ymm0, %ymm0
8; CHECK-NEXT:    retq
9entry:
10  %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 undef, i32 1, i32 undef, i32 5>
11  ret <4 x double> %0
12}
13
14define <4 x double> @test2(<4 x double> %A, <4 x double> %B) {
15; CHECK-LABEL: test2:
16; CHECK:       # %bb.0: # %entry
17; CHECK-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
18; CHECK-NEXT:    retq
19entry:
20  %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 undef, i32 1, i32 undef, i32 1>
21  ret <4 x double> %0
22}
23
24define <4 x double> @test3(<4 x double> %A, <4 x double> %B) {
25; CHECK-LABEL: test3:
26; CHECK:       # %bb.0: # %entry
27; CHECK-NEXT:    vinsertf128 $1, %xmm1, %ymm0, %ymm0
28; CHECK-NEXT:    retq
29entry:
30  %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 0, i32 1, i32 undef, i32 5>
31  ret <4 x double> %0
32}
33
34define <4 x double> @test4(<4 x double> %A, <4 x double> %B) {
35; CHECK-LABEL: test4:
36; CHECK:       # %bb.0: # %entry
37; CHECK-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
38; CHECK-NEXT:    retq
39entry:
40  %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 0, i32 1, i32 undef, i32 1>
41  ret <4 x double> %0
42}
43