1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-lowering -global-isel -verify-machineinstrs %s -o - | FileCheck %s
10 ; CHECK-LABEL: name: truncstore_s8
11 ; CHECK: %ptr:_(p0) = COPY $x0
12 ; CHECK: %val:_(s32) = COPY $w1
13 ; CHECK: G_STORE %val(s32), %ptr(p0) :: (store (s8))
15 %val:_(s32) = COPY $w1
16 %trunc:_(s8) = G_TRUNC %val
17 G_STORE %trunc(s8), %ptr(p0) :: (store (s8))
20 name: truncstore_vector
25 ; CHECK-LABEL: name: truncstore_vector
26 ; CHECK: %ptr:_(p0) = COPY $x0
27 ; CHECK: %val:_(<4 x s32>) = COPY $q0
28 ; CHECK: %trunc:_(<4 x s8>) = G_TRUNC %val(<4 x s32>)
29 ; CHECK: G_STORE %trunc(<4 x s8>), %ptr(p0) :: (store (<4 x s8>))
31 %val:_(<4 x s32>) = COPY $q0
32 %trunc:_(<4 x s8>) = G_TRUNC %val
33 G_STORE %trunc(<4 x s8>), %ptr(p0) :: (store (<4 x s8>))
36 name: truncstore_too_large
41 ; CHECK-LABEL: name: truncstore_too_large
42 ; CHECK: %ptr:_(p0) = COPY $x0
43 ; CHECK: %val:_(s128) = COPY $q0
44 ; CHECK: %trunc:_(s32) = G_TRUNC %val(s128)
45 ; CHECK: G_STORE %trunc(s32), %ptr(p0) :: (store (s32))
47 %val:_(s128) = COPY $q0
48 %trunc:_(s32) = G_TRUNC %val
49 G_STORE %trunc(s32), %ptr(p0) :: (store (s32))