1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-- -run-pass=legalizer -verify-machineinstrs -o - %s | FileCheck %s
8 liveins: $vgpr0, $vgpr1, $vgpr2
10 ; CHECK-LABEL: name: memset_test
11 ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
14 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
15 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(p0) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
16 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2
17 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY2]](s32)
18 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s8) = COPY [[TRUNC]](s8)
19 ; CHECK-NEXT: G_STORE [[COPY2]](s32), [[MV]](p0) :: (store (s8))
20 ; CHECK-NEXT: S_ENDPGM 0
21 %0:_(s32) = COPY $vgpr0
22 %1:_(s32) = COPY $vgpr1
23 %2:_(p0) = G_MERGE_VALUES %0:_(s32), %1:_(s32)
24 %3:_(s32) = COPY $vgpr2
25 %4:_(s16) = G_TRUNC %3:_(s32)
26 %5:_(s8) = G_TRUNC %4:_(s16)
27 %6:_(s32) = G_CONSTANT i32 1
28 %7:_(s64) = G_ZEXT %6:_(s32)
29 G_MEMSET %2:_(p0), %5:_(s8), %7:_(s64), 0 :: (store (s8))