1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -verify-machineinstrs -mtriple=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
7 tracksRegLiveness: true
10 liveins: $h0, $h1, $h2
11 ; CHECK-LABEL: name: s16
12 ; CHECK: liveins: $h0, $h1, $h2
14 ; CHECK-NEXT: %op0:_(s16) = COPY $h0
15 ; CHECK-NEXT: %op1:_(s16) = COPY $h1
16 ; CHECK-NEXT: %op2:_(s16) = COPY $h2
17 ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %op0(s16)
18 ; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %op1(s16)
19 ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s32) = G_FMUL [[FPEXT]], [[FPEXT1]]
20 ; CHECK-NEXT: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[FMUL]](s32)
21 ; CHECK-NEXT: [[FPEXT2:%[0-9]+]]:_(s32) = G_FPEXT [[FPTRUNC]](s16)
22 ; CHECK-NEXT: [[FPEXT3:%[0-9]+]]:_(s32) = G_FPEXT %op2(s16)
23 ; CHECK-NEXT: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[FPEXT2]], [[FPEXT3]]
24 ; CHECK-NEXT: %fmad:_(s16) = G_FPTRUNC [[FADD]](s32)
25 ; CHECK-NEXT: $h0 = COPY %fmad(s16)
26 ; CHECK-NEXT: RET_ReallyLR implicit $h0
27 %op0:_(s16) = COPY $h0
28 %op1:_(s16) = COPY $h1
29 %op2:_(s16) = COPY $h2
30 %fmad:_(s16) = G_FMAD %op0, %op1, %op2
32 RET_ReallyLR implicit $h0
36 tracksRegLiveness: true
39 liveins: $s0, $s1, $s2
40 ; CHECK-LABEL: name: s32
41 ; CHECK: liveins: $s0, $s1, $s2
43 ; CHECK-NEXT: %op0:_(s32) = COPY $s0
44 ; CHECK-NEXT: %op1:_(s32) = COPY $s1
45 ; CHECK-NEXT: %op2:_(s32) = COPY $s2
46 ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s32) = G_FMUL %op0, %op1
47 ; CHECK-NEXT: %fmad:_(s32) = G_FADD [[FMUL]], %op2
48 ; CHECK-NEXT: $s0 = COPY %fmad(s32)
49 ; CHECK-NEXT: RET_ReallyLR implicit $s0
50 %op0:_(s32) = COPY $s0
51 %op1:_(s32) = COPY $s1
52 %op2:_(s32) = COPY $s2
53 %fmad:_(s32) = G_FMAD %op0, %op1, %op2
55 RET_ReallyLR implicit $s0
59 tracksRegLiveness: true
62 liveins: $d0, $d1, $d2
63 ; CHECK-LABEL: name: s64
64 ; CHECK: liveins: $d0, $d1, $d2
66 ; CHECK-NEXT: %op0:_(s64) = COPY $d0
67 ; CHECK-NEXT: %op1:_(s64) = COPY $d1
68 ; CHECK-NEXT: %op2:_(s64) = COPY $d2
69 ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL %op0, %op1
70 ; CHECK-NEXT: %fmad:_(s64) = G_FADD [[FMUL]], %op2
71 ; CHECK-NEXT: $d0 = COPY %fmad(s64)
72 ; CHECK-NEXT: RET_ReallyLR implicit $d0
73 %op0:_(s64) = COPY $d0
74 %op1:_(s64) = COPY $d1
75 %op2:_(s64) = COPY $d2
76 %fmad:_(s64) = G_FMAD %op0, %op1, %op2
78 RET_ReallyLR implicit $d0
82 tracksRegLiveness: true
85 liveins: $d0, $d1, $d2
86 ; CHECK-LABEL: name: v2s32
87 ; CHECK: liveins: $d0, $d1, $d2
89 ; CHECK-NEXT: %op0:_(<2 x s32>) = COPY $d0
90 ; CHECK-NEXT: %op1:_(<2 x s32>) = COPY $d1
91 ; CHECK-NEXT: %op2:_(<2 x s32>) = COPY $d2
92 ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(<2 x s32>) = G_FMUL %op0, %op1
93 ; CHECK-NEXT: %fmad:_(<2 x s32>) = G_FADD [[FMUL]], %op2
94 ; CHECK-NEXT: $d0 = COPY %fmad(<2 x s32>)
95 ; CHECK-NEXT: RET_ReallyLR implicit $d0
96 %op0:_(<2 x s32>) = COPY $d0
97 %op1:_(<2 x s32>) = COPY $d1
98 %op2:_(<2 x s32>) = COPY $d2
99 %fmad:_(<2 x s32>) = G_FMAD %op0, %op1, %op2
101 RET_ReallyLR implicit $d0
105 tracksRegLiveness: true
108 liveins: $q0, $q1, $q2
109 ; CHECK-LABEL: name: v4s32
110 ; CHECK: liveins: $q0, $q1, $q2
112 ; CHECK-NEXT: %op0:_(<4 x s32>) = COPY $q0
113 ; CHECK-NEXT: %op1:_(<4 x s32>) = COPY $q1
114 ; CHECK-NEXT: %op2:_(<4 x s32>) = COPY $q2
115 ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(<4 x s32>) = G_FMUL %op0, %op1
116 ; CHECK-NEXT: %fmad:_(<4 x s32>) = G_FADD [[FMUL]], %op2
117 ; CHECK-NEXT: $q0 = COPY %fmad(<4 x s32>)
118 ; CHECK-NEXT: RET_ReallyLR implicit $q0
119 %op0:_(<4 x s32>) = COPY $q0
120 %op1:_(<4 x s32>) = COPY $q1
121 %op2:_(<4 x s32>) = COPY $q2
122 %fmad:_(<4 x s32>) = G_FMAD %op0, %op1, %op2
124 RET_ReallyLR implicit $q0
128 tracksRegLiveness: true
131 liveins: $q0, $q1, $q2
132 ; CHECK-LABEL: name: v2s64
133 ; CHECK: liveins: $q0, $q1, $q2
135 ; CHECK-NEXT: %op0:_(<2 x s64>) = COPY $q0
136 ; CHECK-NEXT: %op1:_(<2 x s64>) = COPY $q1
137 ; CHECK-NEXT: %op2:_(<2 x s64>) = COPY $q2
138 ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(<2 x s64>) = G_FMUL %op0, %op1
139 ; CHECK-NEXT: %fmad:_(<2 x s64>) = G_FADD [[FMUL]], %op2
140 ; CHECK-NEXT: $q0 = COPY %fmad(<2 x s64>)
141 ; CHECK-NEXT: RET_ReallyLR implicit $q0
142 %op0:_(<2 x s64>) = COPY $q0
143 %op1:_(<2 x s64>) = COPY $q1
144 %op2:_(<2 x s64>) = COPY $q2
145 %fmad:_(<2 x s64>) = G_FMAD %op0, %op1, %op2
147 RET_ReallyLR implicit $q0