11# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
22# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
33
4- --- |
5- define void @contract_s64_gpr(i64* %addr) { ret void }
6- define void @contract_s32_gpr(i32* %addr) { ret void }
7- define void @contract_s64_fpr(i64* %addr) { ret void }
8- define void @contract_s32_fpr(i32* %addr) { ret void }
9- define void @contract_s16_fpr(i16* %addr) { ret void }
10- define void @contract_g_unmerge_values_first(i128* %addr) { ret void }
11- define void @contract_g_unmerge_values_second(i128* %addr) { ret void }
12- ...
134---
145name : contract_s64_gpr
156legalized : true
@@ -20,11 +11,11 @@ body: |
2011 ; CHECK-LABEL: name: contract_s64_gpr
2112 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
2213 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
23- ; CHECK: STRXui [[COPY1]], [[COPY]], 0 :: (store (s64) into %ir.addr )
14+ ; CHECK: STRXui [[COPY1]], [[COPY]], 0 :: (store (s64))
2415 %0:gpr(p0) = COPY $x0
2516 %1:gpr(s64) = COPY $x1
2617 %2:fpr(s64) = COPY %1
27- G_STORE %2:fpr(s64), %0 :: (store (s64) into %ir.addr )
18+ G_STORE %2:fpr(s64), %0 :: (store (s64))
2819 ...
2920---
3021name : contract_s32_gpr
@@ -36,11 +27,11 @@ body: |
3627 ; CHECK-LABEL: name: contract_s32_gpr
3728 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
3829 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
39- ; CHECK: STRWui [[COPY1]], [[COPY]], 0 :: (store (s32) into %ir.addr )
30+ ; CHECK: STRWui [[COPY1]], [[COPY]], 0 :: (store (s32))
4031 %0:gpr(p0) = COPY $x0
4132 %1:gpr(s32) = COPY $w1
4233 %2:fpr(s32) = COPY %1
43- G_STORE %2:fpr(s32), %0 :: (store (s32) into %ir.addr )
34+ G_STORE %2:fpr(s32), %0 :: (store (s32))
4435 ...
4536---
4637name : contract_s64_fpr
@@ -52,11 +43,11 @@ body: |
5243 ; CHECK-LABEL: name: contract_s64_fpr
5344 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
5445 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
55- ; CHECK: STRDui [[COPY1]], [[COPY]], 0 :: (store (s64) into %ir.addr )
46+ ; CHECK: STRDui [[COPY1]], [[COPY]], 0 :: (store (s64))
5647 %0:gpr(p0) = COPY $x0
5748 %1:fpr(s64) = COPY $d1
5849 %2:gpr(s64) = COPY %1
59- G_STORE %2:gpr(s64), %0 :: (store (s64) into %ir.addr )
50+ G_STORE %2:gpr(s64), %0 :: (store (s64))
6051 ...
6152---
6253name : contract_s32_fpr
@@ -68,11 +59,11 @@ body: |
6859 ; CHECK-LABEL: name: contract_s32_fpr
6960 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
7061 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
71- ; CHECK: STRSui [[COPY1]], [[COPY]], 0 :: (store (s32) into %ir.addr )
62+ ; CHECK: STRSui [[COPY1]], [[COPY]], 0 :: (store (s32))
7263 %0:gpr(p0) = COPY $x0
7364 %1:fpr(s32) = COPY $s1
7465 %2:gpr(s32) = COPY %1
75- G_STORE %2:gpr(s32), %0 :: (store (s32) into %ir.addr )
66+ G_STORE %2:gpr(s32), %0 :: (store (s32))
7667 ...
7768---
7869name : contract_s16_fpr
@@ -84,11 +75,11 @@ body: |
8475 ; CHECK-LABEL: name: contract_s16_fpr
8576 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
8677 ; CHECK: [[COPY1:%[0-9]+]]:fpr16 = COPY $h1
87- ; CHECK: STRHui [[COPY1]], [[COPY]], 0 :: (store (s16) into %ir.addr )
78+ ; CHECK: STRHui [[COPY1]], [[COPY]], 0 :: (store (s16))
8879 %0:gpr(p0) = COPY $x0
8980 %1:fpr(s16) = COPY $h1
9081 %2:gpr(s16) = COPY %1
91- G_STORE %2:gpr(s16), %0 :: (store (s16) into %ir.addr )
82+ G_STORE %2:gpr(s16), %0 :: (store (s16))
9283 ...
9384---
9485name : contract_g_unmerge_values_first
@@ -99,15 +90,16 @@ body: |
9990 liveins: $x0, $x1
10091 ; CHECK-LABEL: name: contract_g_unmerge_values_first
10192 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
102- ; CHECK: [[LOAD:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0
103- ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY [[LOAD]].dsub
104- ; CHECK: STRDui [[COPY1]], [[COPY]], 0 :: (store (s64) into %ir.addr)
93+ ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (dereferenceable load (<2 x s64>))
94+ ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY [[LDRQui]].dsub
95+ ; CHECK: [[CPYi64_:%[0-9]+]]:fpr64 = CPYi64 [[LDRQui]], 1
96+ ; CHECK: STRDui [[COPY1]], [[COPY]], 0 :: (store (s64))
10597 %0:gpr(p0) = COPY $x0
106- %1:fpr(<2 x s64>) = G_LOAD %0:gpr(p0) :: (dereferenceable load (<2 x s64>) from %ir.addr )
98+ %1:fpr(<2 x s64>) = G_LOAD %0:gpr(p0) :: (dereferenceable load (<2 x s64>))
10799 %2:fpr(s64), %3:fpr(s64) = G_UNMERGE_VALUES %1:fpr(<2 x s64>)
108100 %4:gpr(s64) = COPY %2
109101 %5:gpr(s64) = COPY %3
110- G_STORE %4:gpr(s64), %0 :: (store (s64) into %ir.addr )
102+ G_STORE %4:gpr(s64), %0 :: (store (s64))
111103 ...
112104---
113105name : contract_g_unmerge_values_second
@@ -118,12 +110,31 @@ body: |
118110 liveins: $x0, $x1
119111 ; CHECK-LABEL: name: contract_g_unmerge_values_second
120112 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
121- ; CHECK: [[LOAD:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0
122- ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = CPYi64 [[LOAD]], 1
123- ; CHECK: STRDui [[COPY1]], [[COPY]], 0 :: (store (s64) into %ir.addr)
113+ ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (dereferenceable load (<2 x s64>))
114+ ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY [[LDRQui]].dsub
115+ ; CHECK: [[CPYi64_:%[0-9]+]]:fpr64 = CPYi64 [[LDRQui]], 1
116+ ; CHECK: STRDui [[CPYi64_]], [[COPY]], 0 :: (store (s64))
124117 %0:gpr(p0) = COPY $x0
125- %1:fpr(<2 x s64>) = G_LOAD %0:gpr(p0) :: (dereferenceable load (<2 x s64>) from %ir.addr )
118+ %1:fpr(<2 x s64>) = G_LOAD %0:gpr(p0) :: (dereferenceable load (<2 x s64>))
126119 %2:fpr(s64), %3:fpr(s64) = G_UNMERGE_VALUES %1:fpr(<2 x s64>)
127120 %4:gpr(s64) = COPY %2
128121 %5:gpr(s64) = COPY %3
129- G_STORE %5:gpr(s64), %0 :: (store (s64) into %ir.addr)
122+ G_STORE %5:gpr(s64), %0 :: (store (s64))
123+ ...
124+ ---
125+ name : contract_s16_truncstore
126+ legalized : true
127+ regBankSelected : true
128+ body : |
129+ bb.0:
130+ liveins: $x0, $s1
131+ ; CHECK-LABEL: name: contract_s16_truncstore
132+ ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
133+ ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
134+ ; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY [[COPY1]]
135+ ; CHECK: STRHHui [[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))
140+ ...
0 commit comments