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: [[COPY:%[0-9]+]]:vr128 = COPY [[DEF]].sub_xmm
28 ; AVX: [[VEXTRACTF128rr:%[0-9]+]]:vr128 = VEXTRACTF128rr [[DEF]], 1
29 ; AVX: $xmm0 = COPY [[COPY]]
30 ; AVX: $xmm1 = COPY [[VEXTRACTF128rr]]
31 ; AVX: RET 0, implicit $xmm0, implicit $xmm1
32 ; AVX512VL-LABEL: name: test_unmerge
33 ; AVX512VL: [[DEF:%[0-9]+]]:vr256x = IMPLICIT_DEF
34 ; AVX512VL: [[COPY:%[0-9]+]]:vr128x = COPY [[DEF]].sub_xmm
35 ; AVX512VL: [[VEXTRACTF32x4Z256rr:%[0-9]+]]:vr128x = VEXTRACTF32x4Z256rr [[DEF]], 1
36 ; AVX512VL: $xmm0 = COPY [[COPY]]
37 ; AVX512VL: $xmm1 = COPY [[VEXTRACTF32x4Z256rr]]
38 ; AVX512VL: RET 0, implicit $xmm0, implicit $xmm1
39 %0(<8 x s32>) = IMPLICIT_DEF
40 %1(<4 x s32>), %2(<4 x s32>) = G_UNMERGE_VALUES %0(<8 x s32>)
41 $xmm0 = COPY %1(<4 x s32>)
42 $xmm1 = COPY %2(<4 x s32>)
43 RET 0, implicit $xmm0, implicit $xmm1