1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
11 ; CHECK-LABEL: name: contract_s64_gpr
12 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
13 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
14 ; CHECK-NEXT: STRXui [[COPY1]], [[COPY]], 0 :: (store (s64))
16 %1:gpr(s64) = COPY $x1
18 G_STORE %2:fpr(s64), %0 :: (store (s64))
21 name: contract_s32_gpr
27 ; CHECK-LABEL: name: contract_s32_gpr
28 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
29 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
30 ; CHECK-NEXT: STRWui [[COPY1]], [[COPY]], 0 :: (store (s32))
32 %1:gpr(s32) = COPY $w1
34 G_STORE %2:fpr(s32), %0 :: (store (s32))
37 name: contract_s64_fpr
43 ; CHECK-LABEL: name: contract_s64_fpr
44 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
45 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
46 ; CHECK-NEXT: STRDui [[COPY1]], [[COPY]], 0 :: (store (s64))
48 %1:fpr(s64) = COPY $d1
50 G_STORE %2:gpr(s64), %0 :: (store (s64))
53 name: contract_s32_fpr
59 ; CHECK-LABEL: name: contract_s32_fpr
60 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
61 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
62 ; CHECK-NEXT: STRSui [[COPY1]], [[COPY]], 0 :: (store (s32))
64 %1:fpr(s32) = COPY $s1
66 G_STORE %2:gpr(s32), %0 :: (store (s32))
69 name: contract_s16_fpr
75 ; CHECK-LABEL: name: contract_s16_fpr
76 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
77 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $h1
78 ; CHECK-NEXT: STRHui [[COPY1]], [[COPY]], 0 :: (store (s16))
80 %1:fpr(s16) = COPY $h1
82 G_STORE %2:gpr(s16), %0 :: (store (s16))
85 name: contract_g_unmerge_values_first
91 ; CHECK-LABEL: name: contract_g_unmerge_values_first
92 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
93 ; CHECK-NEXT: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (dereferenceable load (<2 x s64>))
94 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr64 = COPY [[LDRQui]].dsub
95 ; CHECK-NEXT: [[DUPi64_:%[0-9]+]]:fpr64 = DUPi64 [[LDRQui]], 1
96 ; CHECK-NEXT: STRDui [[COPY1]], [[COPY]], 0 :: (store (s64))
98 %1:fpr(<2 x s64>) = G_LOAD %0:gpr(p0) :: (dereferenceable load (<2 x s64>))
99 %2:fpr(s64), %3:fpr(s64) = G_UNMERGE_VALUES %1:fpr(<2 x s64>)
100 %4:gpr(s64) = COPY %2
101 %5:gpr(s64) = COPY %3
102 G_STORE %4:gpr(s64), %0 :: (store (s64))
105 name: contract_g_unmerge_values_second
107 regBankSelected: true
111 ; CHECK-LABEL: name: contract_g_unmerge_values_second
112 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
113 ; CHECK-NEXT: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (dereferenceable load (<2 x s64>))
114 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr64 = COPY [[LDRQui]].dsub
115 ; CHECK-NEXT: [[DUPi64_:%[0-9]+]]:fpr64 = DUPi64 [[LDRQui]], 1
116 ; CHECK-NEXT: STRDui [[DUPi64_]], [[COPY]], 0 :: (store (s64))
117 %0:gpr(p0) = COPY $x0
118 %1:fpr(<2 x s64>) = G_LOAD %0:gpr(p0) :: (dereferenceable load (<2 x s64>))
119 %2:fpr(s64), %3:fpr(s64) = G_UNMERGE_VALUES %1:fpr(<2 x s64>)
120 %4:gpr(s64) = COPY %2
121 %5:gpr(s64) = COPY %3
122 G_STORE %5:gpr(s64), %0 :: (store (s64))
125 name: contract_s16_truncstore
127 regBankSelected: true
131 ; CHECK-LABEL: name: contract_s16_truncstore
132 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
133 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
134 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:fpr16 = COPY [[COPY1]].hsub
135 ; CHECK-NEXT: STRHui [[COPY2]], [[COPY]], 0 :: (store (s16))
136 %0:gpr(p0) = COPY $x0
137 %1:fpr(s32) = COPY $s1
138 %2:gpr(s32) = COPY %1
139 G_STORE %2:gpr(s32), %0 :: (store (s16))