1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux-gnu -mattr=+avx -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=AVX
3 # RUN: llc -mtriple=x86_64-linux-gnu -mattr=+avx512f,+avx512vl -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=AVX512VL
5 define void @test_unmerge() {
18 - { id: 0, class: vecr }
19 - { id: 1, class: vecr }
20 - { id: 2, class: vecr }
25 ; AVX-LABEL: name: test_unmerge
26 ; AVX: [[DEF:%[0-9]+]]:vr256 = IMPLICIT_DEF
27 ; AVX-NEXT: [[COPY:%[0-9]+]]:vr128 = COPY [[DEF]].sub_xmm
28 ; AVX-NEXT: [[VEXTRACTF128rri:%[0-9]+]]:vr128 = VEXTRACTF128rri [[DEF]], 1
29 ; AVX-NEXT: $xmm0 = COPY [[COPY]]
30 ; AVX-NEXT: $xmm1 = COPY [[VEXTRACTF128rri]]
31 ; AVX-NEXT: RET 0, implicit $xmm0, implicit $xmm1
33 ; AVX512VL-LABEL: name: test_unmerge
34 ; AVX512VL: [[DEF:%[0-9]+]]:vr256x = IMPLICIT_DEF
35 ; AVX512VL-NEXT: [[COPY:%[0-9]+]]:vr128x = COPY [[DEF]].sub_xmm
36 ; AVX512VL-NEXT: [[VEXTRACTF32X4Z256rri:%[0-9]+]]:vr128x = VEXTRACTF32X4Z256rri [[DEF]], 1
37 ; AVX512VL-NEXT: $xmm0 = COPY [[COPY]]
38 ; AVX512VL-NEXT: $xmm1 = COPY [[VEXTRACTF32X4Z256rri]]
39 ; AVX512VL-NEXT: RET 0, implicit $xmm0, implicit $xmm1
40 %0(<8 x s32>) = IMPLICIT_DEF
41 %1(<4 x s32>), %2(<4 x s32>) = G_UNMERGE_VALUES %0(<8 x s32>)
42 $xmm0 = COPY %1(<4 x s32>)
43 $xmm1 = COPY %2(<4 x s32>)
44 RET 0, implicit $xmm0, implicit $xmm1