llvm/llvm/test/CodeGen/X86/GlobalISel/legalize-store-sse.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
# RUN: llc -mtriple=x86_64-linux-gnu -mattr=+sse -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=X86-64-SEE

# test G_STORE with vectors

---
name:            test_gstore_v2s32
body:             |
  bb.0:
    ; X86-64-SEE-LABEL: name: test_gstore_v2s32
    ; X86-64-SEE: [[DEF:%[0-9]+]]:_(<2 x s32>) = IMPLICIT_DEF
    ; X86-64-SEE-NEXT: [[DEF1:%[0-9]+]]:_(p0) = IMPLICIT_DEF
    ; X86-64-SEE-NEXT: G_STORE [[DEF]](<2 x s32>), [[DEF1]](p0) :: (store (<2 x s32>) into `ptr undef`)
    ; X86-64-SEE-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[DEF1]](p0)
    ; X86-64-SEE-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-SEE-LABEL: name: test_gstore_v4s8
    ; X86-64-SEE: [[DEF:%[0-9]+]]:_(<4 x s8>) = IMPLICIT_DEF
    ; X86-64-SEE-NEXT: [[DEF1:%[0-9]+]]:_(p0) = IMPLICIT_DEF
    ; X86-64-SEE-NEXT: G_STORE [[DEF]](<4 x s8>), [[DEF1]](p0) :: (store (<4 x s8>) into `ptr undef`)
    ; X86-64-SEE-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[DEF1]](p0)
    ; X86-64-SEE-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_v2p0
body:             |
  bb.0:
    ; X86-64-SEE-LABEL: name: test_gstore_v2p0
    ; X86-64-SEE: [[DEF:%[0-9]+]]:_(<2 x p0>) = IMPLICIT_DEF
    ; X86-64-SEE-NEXT: [[DEF1:%[0-9]+]]:_(p0) = IMPLICIT_DEF
    ; X86-64-SEE-NEXT: G_STORE [[DEF]](<2 x p0>), [[DEF1]](p0) :: (store (<2 x p0>) into `ptr undef`)
    ; X86-64-SEE-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[DEF1]](p0)
    ; X86-64-SEE-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)

...