# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
# RUN: llc -mtriple=x86_64-linux-gnu -mattr=+avx -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=X86-64-AVX
# test G_STORE with vectors
---
name: test_gstore_v2s32
body: |
bb.0:
; X86-64-AVX-LABEL: name: test_gstore_v2s32
; X86-64-AVX: [[DEF:%[0-9]+]]:_(<2 x s32>) = IMPLICIT_DEF
; X86-64-AVX-NEXT: [[DEF1:%[0-9]+]]:_(p0) = IMPLICIT_DEF
; X86-64-AVX-NEXT: G_STORE [[DEF]](<2 x s32>), [[DEF1]](p0) :: (store (<2 x s32>) into `ptr undef`)
; X86-64-AVX-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[DEF1]](p0)
; X86-64-AVX-NEXT: RET 0, implicit [[COPY]](p0)
%0:_(<2 x s32>) = IMPLICIT_DEF
%1:_(p0) = IMPLICIT_DEF
G_STORE %0:_(<2 x s32>), %1:_(p0) :: (store (<2 x s32>) into `ptr undef`)
%2:_(p0) = COPY %1:_(p0)
RET 0, implicit %2:_(p0)
...
---
name: test_gstore_v4s8
body: |
bb.0:
; X86-64-AVX-LABEL: name: test_gstore_v4s8
; X86-64-AVX: [[DEF:%[0-9]+]]:_(<4 x s8>) = IMPLICIT_DEF
; X86-64-AVX-NEXT: [[DEF1:%[0-9]+]]:_(p0) = IMPLICIT_DEF
; X86-64-AVX-NEXT: G_STORE [[DEF]](<4 x s8>), [[DEF1]](p0) :: (store (<4 x s8>) into `ptr undef`)
; X86-64-AVX-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[DEF1]](p0)
; X86-64-AVX-NEXT: RET 0, implicit [[COPY]](p0)
%0:_(<4 x s8>) = IMPLICIT_DEF
%1:_(p0) = IMPLICIT_DEF
G_STORE %0:_(<4 x s8>), %1:_(p0) :: (store (<4 x s8>) into `ptr undef`)
%2:_(p0) = COPY %1:_(p0)
RET 0, implicit %2:_(p0)
...
---
name: test_gstore_v4p0
body: |
bb.0:
; X86-64-AVX-LABEL: name: test_gstore_v4p0
; X86-64-AVX: [[DEF:%[0-9]+]]:_(<4 x p0>) = IMPLICIT_DEF
; X86-64-AVX-NEXT: [[DEF1:%[0-9]+]]:_(p0) = IMPLICIT_DEF
; X86-64-AVX-NEXT: G_STORE [[DEF]](<4 x p0>), [[DEF1]](p0) :: (store (<4 x p0>) into `ptr undef`)
; X86-64-AVX-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[DEF1]](p0)
; X86-64-AVX-NEXT: RET 0, implicit [[COPY]](p0)
%0:_(<4 x p0>) = IMPLICIT_DEF
%1:_(p0) = IMPLICIT_DEF
G_STORE %0:_(<4 x p0>), %1:_(p0) :: (store (<4 x p0>) into `ptr undef`)
%2:_(p0) = COPY %1:_(p0)
RET 0, implicit %2:_(p0)
...
---
name: test_gstore_v2p0
body: |
bb.0:
; X86-64-AVX-LABEL: name: test_gstore_v2p0
; X86-64-AVX: [[DEF:%[0-9]+]]:_(<2 x p0>) = IMPLICIT_DEF
; X86-64-AVX-NEXT: [[DEF1:%[0-9]+]]:_(p0) = IMPLICIT_DEF
; X86-64-AVX-NEXT: G_STORE [[DEF]](<2 x p0>), [[DEF1]](p0) :: (store (<2 x p0>) into `ptr undef`)
; X86-64-AVX-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[DEF1]](p0)
; X86-64-AVX-NEXT: RET 0, implicit [[COPY]](p0)
%0:_(<2 x p0>) = IMPLICIT_DEF
%1:_(p0) = IMPLICIT_DEF
G_STORE %0:_(<2 x p0>), %1:_(p0) :: (store (<2 x p0>) into `ptr undef`)
%2:_(p0) = COPY %1:_(p0)
RET 0, implicit %2:_(p0)
...