[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / X86 / cx-complex-range.c
bloba0e6dc219b36f78bddc68254a0dcf1f9a9ef1907
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
2 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
3 // RUN: -o - | FileCheck %s --check-prefix=FULL
5 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
6 // RUN: -complex-range=basic -o - | FileCheck %s --check-prefix=BASIC
8 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
9 // RUN: -fno-cx-limited-range -o - | FileCheck %s --check-prefix=FULL
11 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
12 // RUN: -complex-range=improved -o - | FileCheck %s --check-prefix=IMPRVD
14 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
15 // RUN: -complex-range=promoted -o - | FileCheck %s --check-prefix=PRMTD
17 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
18 // RUN: -complex-range=full -o - | FileCheck %s --check-prefix=FULL
20 // RUN: %clang_cc1 -triple x86_64-windows-pc -complex-range=promoted \
21 // RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=X86WINPRMTD
23 // Fast math
24 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
25 // RUN: -ffast-math -complex-range=basic -emit-llvm -o - %s \
26 // RUN: | FileCheck %s --check-prefix=BASIC_FAST
28 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
29 // RUN: -ffast-math -complex-range=full -emit-llvm -o - %s \
30 // RUN: | FileCheck %s --check-prefix=FULL_FAST
32 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
33 // RUN: -fno-cx-fortran-rules -o - | FileCheck %s --check-prefix=FULL
35 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
36 // RUN: -ffast-math -complex-range=improved -emit-llvm -o - %s \
37 // RUN: | FileCheck %s --check-prefix=IMPRVD_FAST
39 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
40 // RUN: -ffast-math -complex-range=promoted -emit-llvm -o - %s \
41 // RUN: | FileCheck %s --check-prefix=PRMTD_FAST
43 // FULL-LABEL: define dso_local <2 x half> @divf16(
44 // FULL-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
45 // FULL-NEXT: entry:
46 // FULL-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
47 // FULL-NEXT: [[A:%.*]] = alloca { half, half }, align 2
48 // FULL-NEXT: [[B:%.*]] = alloca { half, half }, align 2
49 // FULL-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
50 // FULL-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
51 // FULL-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
52 // FULL-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
53 // FULL-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
54 // FULL-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
55 // FULL-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
56 // FULL-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
57 // FULL-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
58 // FULL-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
59 // FULL-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
60 // FULL-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
61 // FULL-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
62 // FULL-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
63 // FULL-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
64 // FULL-NEXT: [[CALL:%.*]] = call <2 x float> @__divsc3(float noundef [[EXT]], float noundef [[EXT1]], float noundef [[EXT2]], float noundef [[EXT3]]) #[[ATTR1:[0-9]+]]
65 // FULL-NEXT: store <2 x float> [[CALL]], ptr [[COERCE]], align 4
66 // FULL-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 0
67 // FULL-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
68 // FULL-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 1
69 // FULL-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
70 // FULL-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[COERCE_REAL]] to half
71 // FULL-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[COERCE_IMAG]] to half
72 // FULL-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
73 // FULL-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
74 // FULL-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
75 // FULL-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
76 // FULL-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
77 // FULL-NEXT: ret <2 x half> [[TMP0]]
79 // BASIC-LABEL: define dso_local <2 x half> @divf16(
80 // BASIC-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
81 // BASIC-NEXT: entry:
82 // BASIC-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
83 // BASIC-NEXT: [[A:%.*]] = alloca { half, half }, align 2
84 // BASIC-NEXT: [[B:%.*]] = alloca { half, half }, align 2
85 // BASIC-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
86 // BASIC-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
87 // BASIC-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
88 // BASIC-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
89 // BASIC-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
90 // BASIC-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
91 // BASIC-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
92 // BASIC-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
93 // BASIC-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
94 // BASIC-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
95 // BASIC-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
96 // BASIC-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
97 // BASIC-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
98 // BASIC-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
99 // BASIC-NEXT: [[TMP0:%.*]] = fmul float [[EXT]], [[EXT2]]
100 // BASIC-NEXT: [[TMP1:%.*]] = fmul float [[EXT1]], [[EXT3]]
101 // BASIC-NEXT: [[TMP2:%.*]] = fadd float [[TMP0]], [[TMP1]]
102 // BASIC-NEXT: [[TMP3:%.*]] = fmul float [[EXT2]], [[EXT2]]
103 // BASIC-NEXT: [[TMP4:%.*]] = fmul float [[EXT3]], [[EXT3]]
104 // BASIC-NEXT: [[TMP5:%.*]] = fadd float [[TMP3]], [[TMP4]]
105 // BASIC-NEXT: [[TMP6:%.*]] = fmul float [[EXT1]], [[EXT2]]
106 // BASIC-NEXT: [[TMP7:%.*]] = fmul float [[EXT]], [[EXT3]]
107 // BASIC-NEXT: [[TMP8:%.*]] = fsub float [[TMP6]], [[TMP7]]
108 // BASIC-NEXT: [[TMP9:%.*]] = fdiv float [[TMP2]], [[TMP5]]
109 // BASIC-NEXT: [[TMP10:%.*]] = fdiv float [[TMP8]], [[TMP5]]
110 // BASIC-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP9]] to half
111 // BASIC-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[TMP10]] to half
112 // BASIC-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
113 // BASIC-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
114 // BASIC-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
115 // BASIC-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
116 // BASIC-NEXT: [[TMP11:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
117 // BASIC-NEXT: ret <2 x half> [[TMP11]]
119 // IMPRVD-LABEL: define dso_local <2 x half> @divf16(
120 // IMPRVD-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
121 // IMPRVD-NEXT: entry:
122 // IMPRVD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
123 // IMPRVD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
124 // IMPRVD-NEXT: [[B:%.*]] = alloca { half, half }, align 2
125 // IMPRVD-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
126 // IMPRVD-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
127 // IMPRVD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
128 // IMPRVD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
129 // IMPRVD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
130 // IMPRVD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
131 // IMPRVD-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
132 // IMPRVD-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
133 // IMPRVD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
134 // IMPRVD-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
135 // IMPRVD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
136 // IMPRVD-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
137 // IMPRVD-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
138 // IMPRVD-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
139 // IMPRVD-NEXT: [[TMP0:%.*]] = call float @llvm.fabs.f32(float [[EXT2]])
140 // IMPRVD-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[EXT3]])
141 // IMPRVD-NEXT: [[ABS_CMP:%.*]] = fcmp ugt float [[TMP0]], [[TMP1]]
142 // IMPRVD-NEXT: br i1 [[ABS_CMP]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI:%.*]]
143 // IMPRVD: abs_rhsr_greater_or_equal_abs_rhsi:
144 // IMPRVD-NEXT: [[TMP2:%.*]] = fdiv float [[EXT3]], [[EXT2]]
145 // IMPRVD-NEXT: [[TMP3:%.*]] = fmul float [[TMP2]], [[EXT3]]
146 // IMPRVD-NEXT: [[TMP4:%.*]] = fadd float [[EXT2]], [[TMP3]]
147 // IMPRVD-NEXT: [[TMP5:%.*]] = fmul float [[EXT1]], [[TMP2]]
148 // IMPRVD-NEXT: [[TMP6:%.*]] = fadd float [[EXT]], [[TMP5]]
149 // IMPRVD-NEXT: [[TMP7:%.*]] = fdiv float [[TMP6]], [[TMP4]]
150 // IMPRVD-NEXT: [[TMP8:%.*]] = fmul float [[EXT]], [[TMP2]]
151 // IMPRVD-NEXT: [[TMP9:%.*]] = fsub float [[EXT1]], [[TMP8]]
152 // IMPRVD-NEXT: [[TMP10:%.*]] = fdiv float [[TMP9]], [[TMP4]]
153 // IMPRVD-NEXT: br label [[COMPLEX_DIV:%.*]]
154 // IMPRVD: abs_rhsr_less_than_abs_rhsi:
155 // IMPRVD-NEXT: [[TMP11:%.*]] = fdiv float [[EXT2]], [[EXT3]]
156 // IMPRVD-NEXT: [[TMP12:%.*]] = fmul float [[TMP11]], [[EXT2]]
157 // IMPRVD-NEXT: [[TMP13:%.*]] = fadd float [[EXT3]], [[TMP12]]
158 // IMPRVD-NEXT: [[TMP14:%.*]] = fmul float [[EXT]], [[TMP11]]
159 // IMPRVD-NEXT: [[TMP15:%.*]] = fadd float [[TMP14]], [[EXT1]]
160 // IMPRVD-NEXT: [[TMP16:%.*]] = fdiv float [[TMP15]], [[TMP13]]
161 // IMPRVD-NEXT: [[TMP17:%.*]] = fmul float [[EXT1]], [[TMP11]]
162 // IMPRVD-NEXT: [[TMP18:%.*]] = fsub float [[TMP17]], [[EXT]]
163 // IMPRVD-NEXT: [[TMP19:%.*]] = fdiv float [[TMP18]], [[TMP13]]
164 // IMPRVD-NEXT: br label [[COMPLEX_DIV]]
165 // IMPRVD: complex_div:
166 // IMPRVD-NEXT: [[TMP20:%.*]] = phi float [ [[TMP7]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP16]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
167 // IMPRVD-NEXT: [[TMP21:%.*]] = phi float [ [[TMP10]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP19]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
168 // IMPRVD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP20]] to half
169 // IMPRVD-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[TMP21]] to half
170 // IMPRVD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
171 // IMPRVD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
172 // IMPRVD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
173 // IMPRVD-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
174 // IMPRVD-NEXT: [[TMP22:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
175 // IMPRVD-NEXT: ret <2 x half> [[TMP22]]
177 // PRMTD-LABEL: define dso_local <2 x half> @divf16(
178 // PRMTD-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
179 // PRMTD-NEXT: entry:
180 // PRMTD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
181 // PRMTD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
182 // PRMTD-NEXT: [[B:%.*]] = alloca { half, half }, align 2
183 // PRMTD-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
184 // PRMTD-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
185 // PRMTD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
186 // PRMTD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
187 // PRMTD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
188 // PRMTD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
189 // PRMTD-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
190 // PRMTD-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
191 // PRMTD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
192 // PRMTD-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
193 // PRMTD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
194 // PRMTD-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
195 // PRMTD-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
196 // PRMTD-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
197 // PRMTD-NEXT: [[TMP0:%.*]] = fmul float [[EXT]], [[EXT2]]
198 // PRMTD-NEXT: [[TMP1:%.*]] = fmul float [[EXT1]], [[EXT3]]
199 // PRMTD-NEXT: [[TMP2:%.*]] = fadd float [[TMP0]], [[TMP1]]
200 // PRMTD-NEXT: [[TMP3:%.*]] = fmul float [[EXT2]], [[EXT2]]
201 // PRMTD-NEXT: [[TMP4:%.*]] = fmul float [[EXT3]], [[EXT3]]
202 // PRMTD-NEXT: [[TMP5:%.*]] = fadd float [[TMP3]], [[TMP4]]
203 // PRMTD-NEXT: [[TMP6:%.*]] = fmul float [[EXT1]], [[EXT2]]
204 // PRMTD-NEXT: [[TMP7:%.*]] = fmul float [[EXT]], [[EXT3]]
205 // PRMTD-NEXT: [[TMP8:%.*]] = fsub float [[TMP6]], [[TMP7]]
206 // PRMTD-NEXT: [[TMP9:%.*]] = fdiv float [[TMP2]], [[TMP5]]
207 // PRMTD-NEXT: [[TMP10:%.*]] = fdiv float [[TMP8]], [[TMP5]]
208 // PRMTD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP9]] to half
209 // PRMTD-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[TMP10]] to half
210 // PRMTD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
211 // PRMTD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
212 // PRMTD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
213 // PRMTD-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
214 // PRMTD-NEXT: [[TMP11:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
215 // PRMTD-NEXT: ret <2 x half> [[TMP11]]
217 // X86WINPRMTD-LABEL: define dso_local i32 @divf16(
218 // X86WINPRMTD-SAME: i32 noundef [[A_COERCE:%.*]], i32 noundef [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
219 // X86WINPRMTD-NEXT: entry:
220 // X86WINPRMTD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
221 // X86WINPRMTD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
222 // X86WINPRMTD-NEXT: [[B:%.*]] = alloca { half, half }, align 2
223 // X86WINPRMTD-NEXT: store i32 [[A_COERCE]], ptr [[A]], align 2
224 // X86WINPRMTD-NEXT: store i32 [[B_COERCE]], ptr [[B]], align 2
225 // X86WINPRMTD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
226 // X86WINPRMTD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
227 // X86WINPRMTD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
228 // X86WINPRMTD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
229 // X86WINPRMTD-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
230 // X86WINPRMTD-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
231 // X86WINPRMTD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
232 // X86WINPRMTD-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
233 // X86WINPRMTD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
234 // X86WINPRMTD-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
235 // X86WINPRMTD-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
236 // X86WINPRMTD-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
237 // X86WINPRMTD-NEXT: [[TMP0:%.*]] = fmul float [[EXT]], [[EXT2]]
238 // X86WINPRMTD-NEXT: [[TMP1:%.*]] = fmul float [[EXT1]], [[EXT3]]
239 // X86WINPRMTD-NEXT: [[TMP2:%.*]] = fadd float [[TMP0]], [[TMP1]]
240 // X86WINPRMTD-NEXT: [[TMP3:%.*]] = fmul float [[EXT2]], [[EXT2]]
241 // X86WINPRMTD-NEXT: [[TMP4:%.*]] = fmul float [[EXT3]], [[EXT3]]
242 // X86WINPRMTD-NEXT: [[TMP5:%.*]] = fadd float [[TMP3]], [[TMP4]]
243 // X86WINPRMTD-NEXT: [[TMP6:%.*]] = fmul float [[EXT1]], [[EXT2]]
244 // X86WINPRMTD-NEXT: [[TMP7:%.*]] = fmul float [[EXT]], [[EXT3]]
245 // X86WINPRMTD-NEXT: [[TMP8:%.*]] = fsub float [[TMP6]], [[TMP7]]
246 // X86WINPRMTD-NEXT: [[TMP9:%.*]] = fdiv float [[TMP2]], [[TMP5]]
247 // X86WINPRMTD-NEXT: [[TMP10:%.*]] = fdiv float [[TMP8]], [[TMP5]]
248 // X86WINPRMTD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP9]] to half
249 // X86WINPRMTD-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[TMP10]] to half
250 // X86WINPRMTD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
251 // X86WINPRMTD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
252 // X86WINPRMTD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
253 // X86WINPRMTD-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
254 // X86WINPRMTD-NEXT: [[TMP11:%.*]] = load i32, ptr [[RETVAL]], align 2
255 // X86WINPRMTD-NEXT: ret i32 [[TMP11]]
257 // BASIC_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @divf16(
258 // BASIC_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
259 // BASIC_FAST-NEXT: entry:
260 // BASIC_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
261 // BASIC_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
262 // BASIC_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
263 // BASIC_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
264 // BASIC_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
265 // BASIC_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
266 // BASIC_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
267 // BASIC_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
268 // BASIC_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
269 // BASIC_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
270 // BASIC_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
271 // BASIC_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
272 // BASIC_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
273 // BASIC_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
274 // BASIC_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
275 // BASIC_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
276 // BASIC_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
277 // BASIC_FAST-NEXT: [[TMP0:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT2]]
278 // BASIC_FAST-NEXT: [[TMP1:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT3]]
279 // BASIC_FAST-NEXT: [[TMP2:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP0]], [[TMP1]]
280 // BASIC_FAST-NEXT: [[TMP3:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT2]], [[EXT2]]
281 // BASIC_FAST-NEXT: [[TMP4:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT3]], [[EXT3]]
282 // BASIC_FAST-NEXT: [[TMP5:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP3]], [[TMP4]]
283 // BASIC_FAST-NEXT: [[TMP6:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT2]]
284 // BASIC_FAST-NEXT: [[TMP7:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT3]]
285 // BASIC_FAST-NEXT: [[TMP8:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[TMP6]], [[TMP7]]
286 // BASIC_FAST-NEXT: [[TMP9:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP2]], [[TMP5]]
287 // BASIC_FAST-NEXT: [[TMP10:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP8]], [[TMP5]]
288 // BASIC_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP9]] to half
289 // BASIC_FAST-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[TMP10]] to half
290 // BASIC_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
291 // BASIC_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
292 // BASIC_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
293 // BASIC_FAST-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
294 // BASIC_FAST-NEXT: [[TMP11:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
295 // BASIC_FAST-NEXT: ret <2 x half> [[TMP11]]
297 // FULL_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @divf16(
298 // FULL_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
299 // FULL_FAST-NEXT: entry:
300 // FULL_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
301 // FULL_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
302 // FULL_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
303 // FULL_FAST-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
304 // FULL_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
305 // FULL_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
306 // FULL_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
307 // FULL_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
308 // FULL_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
309 // FULL_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
310 // FULL_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
311 // FULL_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
312 // FULL_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
313 // FULL_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
314 // FULL_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
315 // FULL_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
316 // FULL_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
317 // FULL_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
318 // FULL_FAST-NEXT: [[CALL:%.*]] = call reassoc nnan ninf nsz arcp afn nofpclass(nan inf) <2 x float> @__divsc3(float noundef nofpclass(nan inf) [[EXT]], float noundef nofpclass(nan inf) [[EXT1]], float noundef nofpclass(nan inf) [[EXT2]], float noundef nofpclass(nan inf) [[EXT3]]) #[[ATTR1:[0-9]+]]
319 // FULL_FAST-NEXT: store <2 x float> [[CALL]], ptr [[COERCE]], align 4
320 // FULL_FAST-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 0
321 // FULL_FAST-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
322 // FULL_FAST-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 1
323 // FULL_FAST-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
324 // FULL_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[COERCE_REAL]] to half
325 // FULL_FAST-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[COERCE_IMAG]] to half
326 // FULL_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
327 // FULL_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
328 // FULL_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
329 // FULL_FAST-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
330 // FULL_FAST-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
331 // FULL_FAST-NEXT: ret <2 x half> [[TMP0]]
333 // IMPRVD_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @divf16(
334 // IMPRVD_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
335 // IMPRVD_FAST-NEXT: entry:
336 // IMPRVD_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
337 // IMPRVD_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
338 // IMPRVD_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
339 // IMPRVD_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
340 // IMPRVD_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
341 // IMPRVD_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
342 // IMPRVD_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
343 // IMPRVD_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
344 // IMPRVD_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
345 // IMPRVD_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
346 // IMPRVD_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
347 // IMPRVD_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
348 // IMPRVD_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
349 // IMPRVD_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
350 // IMPRVD_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
351 // IMPRVD_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
352 // IMPRVD_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
353 // IMPRVD_FAST-NEXT: [[TMP0:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.fabs.f32(float [[EXT2]])
354 // IMPRVD_FAST-NEXT: [[TMP1:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.fabs.f32(float [[EXT3]])
355 // IMPRVD_FAST-NEXT: [[ABS_CMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn ugt float [[TMP0]], [[TMP1]]
356 // IMPRVD_FAST-NEXT: br i1 [[ABS_CMP]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI:%.*]]
357 // IMPRVD_FAST: abs_rhsr_greater_or_equal_abs_rhsi:
358 // IMPRVD_FAST-NEXT: [[TMP2:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[EXT3]], [[EXT2]]
359 // IMPRVD_FAST-NEXT: [[TMP3:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[TMP2]], [[EXT3]]
360 // IMPRVD_FAST-NEXT: [[TMP4:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[EXT2]], [[TMP3]]
361 // IMPRVD_FAST-NEXT: [[TMP5:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[TMP2]]
362 // IMPRVD_FAST-NEXT: [[TMP6:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[EXT]], [[TMP5]]
363 // IMPRVD_FAST-NEXT: [[TMP7:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP6]], [[TMP4]]
364 // IMPRVD_FAST-NEXT: [[TMP8:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[TMP2]]
365 // IMPRVD_FAST-NEXT: [[TMP9:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[EXT1]], [[TMP8]]
366 // IMPRVD_FAST-NEXT: [[TMP10:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP9]], [[TMP4]]
367 // IMPRVD_FAST-NEXT: br label [[COMPLEX_DIV:%.*]]
368 // IMPRVD_FAST: abs_rhsr_less_than_abs_rhsi:
369 // IMPRVD_FAST-NEXT: [[TMP11:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[EXT2]], [[EXT3]]
370 // IMPRVD_FAST-NEXT: [[TMP12:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[TMP11]], [[EXT2]]
371 // IMPRVD_FAST-NEXT: [[TMP13:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[EXT3]], [[TMP12]]
372 // IMPRVD_FAST-NEXT: [[TMP14:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[TMP11]]
373 // IMPRVD_FAST-NEXT: [[TMP15:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP14]], [[EXT1]]
374 // IMPRVD_FAST-NEXT: [[TMP16:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP15]], [[TMP13]]
375 // IMPRVD_FAST-NEXT: [[TMP17:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[TMP11]]
376 // IMPRVD_FAST-NEXT: [[TMP18:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[TMP17]], [[EXT]]
377 // IMPRVD_FAST-NEXT: [[TMP19:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP18]], [[TMP13]]
378 // IMPRVD_FAST-NEXT: br label [[COMPLEX_DIV]]
379 // IMPRVD_FAST: complex_div:
380 // IMPRVD_FAST-NEXT: [[TMP20:%.*]] = phi reassoc nnan ninf nsz arcp afn float [ [[TMP7]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP16]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
381 // IMPRVD_FAST-NEXT: [[TMP21:%.*]] = phi reassoc nnan ninf nsz arcp afn float [ [[TMP10]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP19]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
382 // IMPRVD_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP20]] to half
383 // IMPRVD_FAST-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[TMP21]] to half
384 // IMPRVD_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
385 // IMPRVD_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
386 // IMPRVD_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
387 // IMPRVD_FAST-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
388 // IMPRVD_FAST-NEXT: [[TMP22:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
389 // IMPRVD_FAST-NEXT: ret <2 x half> [[TMP22]]
391 // PRMTD_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @divf16(
392 // PRMTD_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
393 // PRMTD_FAST-NEXT: entry:
394 // PRMTD_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
395 // PRMTD_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
396 // PRMTD_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
397 // PRMTD_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
398 // PRMTD_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
399 // PRMTD_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
400 // PRMTD_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
401 // PRMTD_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
402 // PRMTD_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
403 // PRMTD_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
404 // PRMTD_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
405 // PRMTD_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
406 // PRMTD_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
407 // PRMTD_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
408 // PRMTD_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
409 // PRMTD_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
410 // PRMTD_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
411 // PRMTD_FAST-NEXT: [[TMP0:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT2]]
412 // PRMTD_FAST-NEXT: [[TMP1:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT3]]
413 // PRMTD_FAST-NEXT: [[TMP2:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP0]], [[TMP1]]
414 // PRMTD_FAST-NEXT: [[TMP3:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT2]], [[EXT2]]
415 // PRMTD_FAST-NEXT: [[TMP4:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT3]], [[EXT3]]
416 // PRMTD_FAST-NEXT: [[TMP5:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP3]], [[TMP4]]
417 // PRMTD_FAST-NEXT: [[TMP6:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT2]]
418 // PRMTD_FAST-NEXT: [[TMP7:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT3]]
419 // PRMTD_FAST-NEXT: [[TMP8:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[TMP6]], [[TMP7]]
420 // PRMTD_FAST-NEXT: [[TMP9:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP2]], [[TMP5]]
421 // PRMTD_FAST-NEXT: [[TMP10:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP8]], [[TMP5]]
422 // PRMTD_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP9]] to half
423 // PRMTD_FAST-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[TMP10]] to half
424 // PRMTD_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
425 // PRMTD_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
426 // PRMTD_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
427 // PRMTD_FAST-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
428 // PRMTD_FAST-NEXT: [[TMP11:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
429 // PRMTD_FAST-NEXT: ret <2 x half> [[TMP11]]
431 _Complex _Float16 divf16(_Complex _Float16 a, _Complex _Float16 b) {
432 return a / b;
435 // FULL-LABEL: define dso_local <2 x half> @mulf16(
436 // FULL-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0]] {
437 // FULL-NEXT: entry:
438 // FULL-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
439 // FULL-NEXT: [[A:%.*]] = alloca { half, half }, align 2
440 // FULL-NEXT: [[B:%.*]] = alloca { half, half }, align 2
441 // FULL-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
442 // FULL-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
443 // FULL-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
444 // FULL-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
445 // FULL-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
446 // FULL-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
447 // FULL-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
448 // FULL-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
449 // FULL-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
450 // FULL-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
451 // FULL-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
452 // FULL-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
453 // FULL-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
454 // FULL-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
455 // FULL-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
456 // FULL-NEXT: [[MUL_AC:%.*]] = fmul float [[EXT]], [[EXT2]]
457 // FULL-NEXT: [[MUL_BD:%.*]] = fmul float [[EXT1]], [[EXT3]]
458 // FULL-NEXT: [[MUL_AD:%.*]] = fmul float [[EXT]], [[EXT3]]
459 // FULL-NEXT: [[MUL_BC:%.*]] = fmul float [[EXT1]], [[EXT2]]
460 // FULL-NEXT: [[MUL_R:%.*]] = fsub float [[MUL_AC]], [[MUL_BD]]
461 // FULL-NEXT: [[MUL_I:%.*]] = fadd float [[MUL_AD]], [[MUL_BC]]
462 // FULL-NEXT: [[ISNAN_CMP:%.*]] = fcmp uno float [[MUL_R]], [[MUL_R]]
463 // FULL-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2:![0-9]+]]
464 // FULL: complex_mul_imag_nan:
465 // FULL-NEXT: [[ISNAN_CMP4:%.*]] = fcmp uno float [[MUL_I]], [[MUL_I]]
466 // FULL-NEXT: br i1 [[ISNAN_CMP4]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
467 // FULL: complex_mul_libcall:
468 // FULL-NEXT: [[CALL:%.*]] = call <2 x float> @__mulsc3(float noundef [[EXT]], float noundef [[EXT1]], float noundef [[EXT2]], float noundef [[EXT3]]) #[[ATTR1]]
469 // FULL-NEXT: store <2 x float> [[CALL]], ptr [[COERCE]], align 4
470 // FULL-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 0
471 // FULL-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
472 // FULL-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 1
473 // FULL-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
474 // FULL-NEXT: br label [[COMPLEX_MUL_CONT]]
475 // FULL: complex_mul_cont:
476 // FULL-NEXT: [[REAL_MUL_PHI:%.*]] = phi float [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_REAL]], [[COMPLEX_MUL_LIBCALL]] ]
477 // FULL-NEXT: [[IMAG_MUL_PHI:%.*]] = phi float [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_IMAG]], [[COMPLEX_MUL_LIBCALL]] ]
478 // FULL-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[REAL_MUL_PHI]] to half
479 // FULL-NEXT: [[UNPROMOTION5:%.*]] = fptrunc float [[IMAG_MUL_PHI]] to half
480 // FULL-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
481 // FULL-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
482 // FULL-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
483 // FULL-NEXT: store half [[UNPROMOTION5]], ptr [[RETVAL_IMAGP]], align 2
484 // FULL-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
485 // FULL-NEXT: ret <2 x half> [[TMP0]]
487 // BASIC-LABEL: define dso_local <2 x half> @mulf16(
488 // BASIC-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0]] {
489 // BASIC-NEXT: entry:
490 // BASIC-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
491 // BASIC-NEXT: [[A:%.*]] = alloca { half, half }, align 2
492 // BASIC-NEXT: [[B:%.*]] = alloca { half, half }, align 2
493 // BASIC-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
494 // BASIC-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
495 // BASIC-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
496 // BASIC-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
497 // BASIC-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
498 // BASIC-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
499 // BASIC-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
500 // BASIC-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
501 // BASIC-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
502 // BASIC-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
503 // BASIC-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
504 // BASIC-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
505 // BASIC-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
506 // BASIC-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
507 // BASIC-NEXT: [[MUL_AC:%.*]] = fmul float [[EXT]], [[EXT2]]
508 // BASIC-NEXT: [[MUL_BD:%.*]] = fmul float [[EXT1]], [[EXT3]]
509 // BASIC-NEXT: [[MUL_AD:%.*]] = fmul float [[EXT]], [[EXT3]]
510 // BASIC-NEXT: [[MUL_BC:%.*]] = fmul float [[EXT1]], [[EXT2]]
511 // BASIC-NEXT: [[MUL_R:%.*]] = fsub float [[MUL_AC]], [[MUL_BD]]
512 // BASIC-NEXT: [[MUL_I:%.*]] = fadd float [[MUL_AD]], [[MUL_BC]]
513 // BASIC-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
514 // BASIC-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[MUL_I]] to half
515 // BASIC-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
516 // BASIC-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
517 // BASIC-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
518 // BASIC-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
519 // BASIC-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
520 // BASIC-NEXT: ret <2 x half> [[TMP0]]
522 // IMPRVD-LABEL: define dso_local <2 x half> @mulf16(
523 // IMPRVD-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0]] {
524 // IMPRVD-NEXT: entry:
525 // IMPRVD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
526 // IMPRVD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
527 // IMPRVD-NEXT: [[B:%.*]] = alloca { half, half }, align 2
528 // IMPRVD-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
529 // IMPRVD-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
530 // IMPRVD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
531 // IMPRVD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
532 // IMPRVD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
533 // IMPRVD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
534 // IMPRVD-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
535 // IMPRVD-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
536 // IMPRVD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
537 // IMPRVD-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
538 // IMPRVD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
539 // IMPRVD-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
540 // IMPRVD-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
541 // IMPRVD-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
542 // IMPRVD-NEXT: [[MUL_AC:%.*]] = fmul float [[EXT]], [[EXT2]]
543 // IMPRVD-NEXT: [[MUL_BD:%.*]] = fmul float [[EXT1]], [[EXT3]]
544 // IMPRVD-NEXT: [[MUL_AD:%.*]] = fmul float [[EXT]], [[EXT3]]
545 // IMPRVD-NEXT: [[MUL_BC:%.*]] = fmul float [[EXT1]], [[EXT2]]
546 // IMPRVD-NEXT: [[MUL_R:%.*]] = fsub float [[MUL_AC]], [[MUL_BD]]
547 // IMPRVD-NEXT: [[MUL_I:%.*]] = fadd float [[MUL_AD]], [[MUL_BC]]
548 // IMPRVD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
549 // IMPRVD-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[MUL_I]] to half
550 // IMPRVD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
551 // IMPRVD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
552 // IMPRVD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
553 // IMPRVD-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
554 // IMPRVD-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
555 // IMPRVD-NEXT: ret <2 x half> [[TMP0]]
557 // PRMTD-LABEL: define dso_local <2 x half> @mulf16(
558 // PRMTD-SAME: <2 x half> noundef [[A_COERCE:%.*]], <2 x half> noundef [[B_COERCE:%.*]]) #[[ATTR0]] {
559 // PRMTD-NEXT: entry:
560 // PRMTD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
561 // PRMTD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
562 // PRMTD-NEXT: [[B:%.*]] = alloca { half, half }, align 2
563 // PRMTD-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
564 // PRMTD-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
565 // PRMTD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
566 // PRMTD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
567 // PRMTD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
568 // PRMTD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
569 // PRMTD-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
570 // PRMTD-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
571 // PRMTD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
572 // PRMTD-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
573 // PRMTD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
574 // PRMTD-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
575 // PRMTD-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
576 // PRMTD-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
577 // PRMTD-NEXT: [[MUL_AC:%.*]] = fmul float [[EXT]], [[EXT2]]
578 // PRMTD-NEXT: [[MUL_BD:%.*]] = fmul float [[EXT1]], [[EXT3]]
579 // PRMTD-NEXT: [[MUL_AD:%.*]] = fmul float [[EXT]], [[EXT3]]
580 // PRMTD-NEXT: [[MUL_BC:%.*]] = fmul float [[EXT1]], [[EXT2]]
581 // PRMTD-NEXT: [[MUL_R:%.*]] = fsub float [[MUL_AC]], [[MUL_BD]]
582 // PRMTD-NEXT: [[MUL_I:%.*]] = fadd float [[MUL_AD]], [[MUL_BC]]
583 // PRMTD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
584 // PRMTD-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[MUL_I]] to half
585 // PRMTD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
586 // PRMTD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
587 // PRMTD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
588 // PRMTD-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
589 // PRMTD-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
590 // PRMTD-NEXT: ret <2 x half> [[TMP0]]
592 // X86WINPRMTD-LABEL: define dso_local i32 @mulf16(
593 // X86WINPRMTD-SAME: i32 noundef [[A_COERCE:%.*]], i32 noundef [[B_COERCE:%.*]]) #[[ATTR0]] {
594 // X86WINPRMTD-NEXT: entry:
595 // X86WINPRMTD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
596 // X86WINPRMTD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
597 // X86WINPRMTD-NEXT: [[B:%.*]] = alloca { half, half }, align 2
598 // X86WINPRMTD-NEXT: store i32 [[A_COERCE]], ptr [[A]], align 2
599 // X86WINPRMTD-NEXT: store i32 [[B_COERCE]], ptr [[B]], align 2
600 // X86WINPRMTD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
601 // X86WINPRMTD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
602 // X86WINPRMTD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
603 // X86WINPRMTD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
604 // X86WINPRMTD-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
605 // X86WINPRMTD-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
606 // X86WINPRMTD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
607 // X86WINPRMTD-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
608 // X86WINPRMTD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
609 // X86WINPRMTD-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
610 // X86WINPRMTD-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
611 // X86WINPRMTD-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
612 // X86WINPRMTD-NEXT: [[MUL_AC:%.*]] = fmul float [[EXT]], [[EXT2]]
613 // X86WINPRMTD-NEXT: [[MUL_BD:%.*]] = fmul float [[EXT1]], [[EXT3]]
614 // X86WINPRMTD-NEXT: [[MUL_AD:%.*]] = fmul float [[EXT]], [[EXT3]]
615 // X86WINPRMTD-NEXT: [[MUL_BC:%.*]] = fmul float [[EXT1]], [[EXT2]]
616 // X86WINPRMTD-NEXT: [[MUL_R:%.*]] = fsub float [[MUL_AC]], [[MUL_BD]]
617 // X86WINPRMTD-NEXT: [[MUL_I:%.*]] = fadd float [[MUL_AD]], [[MUL_BC]]
618 // X86WINPRMTD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
619 // X86WINPRMTD-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[MUL_I]] to half
620 // X86WINPRMTD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
621 // X86WINPRMTD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
622 // X86WINPRMTD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
623 // X86WINPRMTD-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
624 // X86WINPRMTD-NEXT: [[TMP0:%.*]] = load i32, ptr [[RETVAL]], align 2
625 // X86WINPRMTD-NEXT: ret i32 [[TMP0]]
627 // BASIC_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @mulf16(
628 // BASIC_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0]] {
629 // BASIC_FAST-NEXT: entry:
630 // BASIC_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
631 // BASIC_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
632 // BASIC_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
633 // BASIC_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
634 // BASIC_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
635 // BASIC_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
636 // BASIC_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
637 // BASIC_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
638 // BASIC_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
639 // BASIC_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
640 // BASIC_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
641 // BASIC_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
642 // BASIC_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
643 // BASIC_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
644 // BASIC_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
645 // BASIC_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
646 // BASIC_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
647 // BASIC_FAST-NEXT: [[MUL_AC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT2]]
648 // BASIC_FAST-NEXT: [[MUL_BD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT3]]
649 // BASIC_FAST-NEXT: [[MUL_AD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT3]]
650 // BASIC_FAST-NEXT: [[MUL_BC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT2]]
651 // BASIC_FAST-NEXT: [[MUL_R:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[MUL_AC]], [[MUL_BD]]
652 // BASIC_FAST-NEXT: [[MUL_I:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[MUL_AD]], [[MUL_BC]]
653 // BASIC_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
654 // BASIC_FAST-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[MUL_I]] to half
655 // BASIC_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
656 // BASIC_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
657 // BASIC_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
658 // BASIC_FAST-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
659 // BASIC_FAST-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
660 // BASIC_FAST-NEXT: ret <2 x half> [[TMP0]]
662 // FULL_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @mulf16(
663 // FULL_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0]] {
664 // FULL_FAST-NEXT: entry:
665 // FULL_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
666 // FULL_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
667 // FULL_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
668 // FULL_FAST-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
669 // FULL_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
670 // FULL_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
671 // FULL_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
672 // FULL_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
673 // FULL_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
674 // FULL_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
675 // FULL_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
676 // FULL_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
677 // FULL_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
678 // FULL_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
679 // FULL_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
680 // FULL_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
681 // FULL_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
682 // FULL_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
683 // FULL_FAST-NEXT: [[MUL_AC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT2]]
684 // FULL_FAST-NEXT: [[MUL_BD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT3]]
685 // FULL_FAST-NEXT: [[MUL_AD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT3]]
686 // FULL_FAST-NEXT: [[MUL_BC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT2]]
687 // FULL_FAST-NEXT: [[MUL_R:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[MUL_AC]], [[MUL_BD]]
688 // FULL_FAST-NEXT: [[MUL_I:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[MUL_AD]], [[MUL_BC]]
689 // FULL_FAST-NEXT: [[ISNAN_CMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn uno float [[MUL_R]], [[MUL_R]]
690 // FULL_FAST-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2:![0-9]+]]
691 // FULL_FAST: complex_mul_imag_nan:
692 // FULL_FAST-NEXT: [[ISNAN_CMP4:%.*]] = fcmp reassoc nnan ninf nsz arcp afn uno float [[MUL_I]], [[MUL_I]]
693 // FULL_FAST-NEXT: br i1 [[ISNAN_CMP4]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
694 // FULL_FAST: complex_mul_libcall:
695 // FULL_FAST-NEXT: [[CALL:%.*]] = call reassoc nnan ninf nsz arcp afn nofpclass(nan inf) <2 x float> @__mulsc3(float noundef nofpclass(nan inf) [[EXT]], float noundef nofpclass(nan inf) [[EXT1]], float noundef nofpclass(nan inf) [[EXT2]], float noundef nofpclass(nan inf) [[EXT3]]) #[[ATTR1]]
696 // FULL_FAST-NEXT: store <2 x float> [[CALL]], ptr [[COERCE]], align 4
697 // FULL_FAST-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 0
698 // FULL_FAST-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
699 // FULL_FAST-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 1
700 // FULL_FAST-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
701 // FULL_FAST-NEXT: br label [[COMPLEX_MUL_CONT]]
702 // FULL_FAST: complex_mul_cont:
703 // FULL_FAST-NEXT: [[REAL_MUL_PHI:%.*]] = phi reassoc nnan ninf nsz arcp afn float [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_REAL]], [[COMPLEX_MUL_LIBCALL]] ]
704 // FULL_FAST-NEXT: [[IMAG_MUL_PHI:%.*]] = phi reassoc nnan ninf nsz arcp afn float [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_IMAG]], [[COMPLEX_MUL_LIBCALL]] ]
705 // FULL_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[REAL_MUL_PHI]] to half
706 // FULL_FAST-NEXT: [[UNPROMOTION5:%.*]] = fptrunc float [[IMAG_MUL_PHI]] to half
707 // FULL_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
708 // FULL_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
709 // FULL_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
710 // FULL_FAST-NEXT: store half [[UNPROMOTION5]], ptr [[RETVAL_IMAGP]], align 2
711 // FULL_FAST-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
712 // FULL_FAST-NEXT: ret <2 x half> [[TMP0]]
714 // IMPRVD_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @mulf16(
715 // IMPRVD_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0]] {
716 // IMPRVD_FAST-NEXT: entry:
717 // IMPRVD_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
718 // IMPRVD_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
719 // IMPRVD_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
720 // IMPRVD_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
721 // IMPRVD_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
722 // IMPRVD_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
723 // IMPRVD_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
724 // IMPRVD_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
725 // IMPRVD_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
726 // IMPRVD_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
727 // IMPRVD_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
728 // IMPRVD_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
729 // IMPRVD_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
730 // IMPRVD_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
731 // IMPRVD_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
732 // IMPRVD_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
733 // IMPRVD_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
734 // IMPRVD_FAST-NEXT: [[MUL_AC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT2]]
735 // IMPRVD_FAST-NEXT: [[MUL_BD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT3]]
736 // IMPRVD_FAST-NEXT: [[MUL_AD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT3]]
737 // IMPRVD_FAST-NEXT: [[MUL_BC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT2]]
738 // IMPRVD_FAST-NEXT: [[MUL_R:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[MUL_AC]], [[MUL_BD]]
739 // IMPRVD_FAST-NEXT: [[MUL_I:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[MUL_AD]], [[MUL_BC]]
740 // IMPRVD_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
741 // IMPRVD_FAST-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[MUL_I]] to half
742 // IMPRVD_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
743 // IMPRVD_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
744 // IMPRVD_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
745 // IMPRVD_FAST-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
746 // IMPRVD_FAST-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
747 // IMPRVD_FAST-NEXT: ret <2 x half> [[TMP0]]
749 // PRMTD_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @mulf16(
750 // PRMTD_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x half> noundef nofpclass(nan inf) [[B_COERCE:%.*]]) #[[ATTR0]] {
751 // PRMTD_FAST-NEXT: entry:
752 // PRMTD_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
753 // PRMTD_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
754 // PRMTD_FAST-NEXT: [[B:%.*]] = alloca { half, half }, align 2
755 // PRMTD_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
756 // PRMTD_FAST-NEXT: store <2 x half> [[B_COERCE]], ptr [[B]], align 2
757 // PRMTD_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
758 // PRMTD_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
759 // PRMTD_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
760 // PRMTD_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
761 // PRMTD_FAST-NEXT: [[EXT:%.*]] = fpext half [[A_REAL]] to float
762 // PRMTD_FAST-NEXT: [[EXT1:%.*]] = fpext half [[A_IMAG]] to float
763 // PRMTD_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 0
764 // PRMTD_FAST-NEXT: [[B_REAL:%.*]] = load half, ptr [[B_REALP]], align 2
765 // PRMTD_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[B]], i32 0, i32 1
766 // PRMTD_FAST-NEXT: [[B_IMAG:%.*]] = load half, ptr [[B_IMAGP]], align 2
767 // PRMTD_FAST-NEXT: [[EXT2:%.*]] = fpext half [[B_REAL]] to float
768 // PRMTD_FAST-NEXT: [[EXT3:%.*]] = fpext half [[B_IMAG]] to float
769 // PRMTD_FAST-NEXT: [[MUL_AC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT2]]
770 // PRMTD_FAST-NEXT: [[MUL_BD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT3]]
771 // PRMTD_FAST-NEXT: [[MUL_AD:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT3]]
772 // PRMTD_FAST-NEXT: [[MUL_BC:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT1]], [[EXT2]]
773 // PRMTD_FAST-NEXT: [[MUL_R:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[MUL_AC]], [[MUL_BD]]
774 // PRMTD_FAST-NEXT: [[MUL_I:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[MUL_AD]], [[MUL_BC]]
775 // PRMTD_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
776 // PRMTD_FAST-NEXT: [[UNPROMOTION4:%.*]] = fptrunc float [[MUL_I]] to half
777 // PRMTD_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
778 // PRMTD_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
779 // PRMTD_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
780 // PRMTD_FAST-NEXT: store half [[UNPROMOTION4]], ptr [[RETVAL_IMAGP]], align 2
781 // PRMTD_FAST-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
782 // PRMTD_FAST-NEXT: ret <2 x half> [[TMP0]]
784 _Complex _Float16 mulf16(_Complex _Float16 a, _Complex _Float16 b) {
785 return a * b;
788 // FULL-LABEL: define dso_local <2 x half> @f1(
789 // FULL-SAME: <2 x half> noundef [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef [[C_COERCE:%.*]]) #[[ATTR0]] {
790 // FULL-NEXT: entry:
791 // FULL-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
792 // FULL-NEXT: [[A:%.*]] = alloca { half, half }, align 2
793 // FULL-NEXT: [[C:%.*]] = alloca { half, half }, align 2
794 // FULL-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
795 // FULL-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
796 // FULL-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
797 // FULL-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
798 // FULL-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
799 // FULL-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
800 // FULL-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
801 // FULL-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
802 // FULL-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
803 // FULL-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
804 // FULL-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
805 // FULL-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
806 // FULL-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
807 // FULL-NEXT: [[CALL:%.*]] = call { x86_fp80, x86_fp80 } @__divxc3(x86_fp80 noundef [[B_REAL]], x86_fp80 noundef [[B_IMAG]], x86_fp80 noundef [[CONV]], x86_fp80 noundef [[CONV1]]) #[[ATTR1]]
808 // FULL-NEXT: [[TMP0:%.*]] = extractvalue { x86_fp80, x86_fp80 } [[CALL]], 0
809 // FULL-NEXT: [[TMP1:%.*]] = extractvalue { x86_fp80, x86_fp80 } [[CALL]], 1
810 // FULL-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP0]] to half
811 // FULL-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP1]] to half
812 // FULL-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
813 // FULL-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
814 // FULL-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
815 // FULL-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
816 // FULL-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
817 // FULL-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
818 // FULL-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
819 // FULL-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
820 // FULL-NEXT: [[CALL7:%.*]] = call <2 x float> @__divsc3(float noundef [[EXT]], float noundef [[EXT4]], float noundef [[EXT5]], float noundef [[EXT6]]) #[[ATTR1]]
821 // FULL-NEXT: store <2 x float> [[CALL7]], ptr [[COERCE]], align 4
822 // FULL-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 0
823 // FULL-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
824 // FULL-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 1
825 // FULL-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
826 // FULL-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[COERCE_REAL]] to half
827 // FULL-NEXT: [[UNPROMOTION8:%.*]] = fptrunc float [[COERCE_IMAG]] to half
828 // FULL-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
829 // FULL-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
830 // FULL-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
831 // FULL-NEXT: store half [[UNPROMOTION8]], ptr [[RETVAL_IMAGP]], align 2
832 // FULL-NEXT: [[TMP2:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
833 // FULL-NEXT: ret <2 x half> [[TMP2]]
835 // BASIC-LABEL: define dso_local <2 x half> @f1(
836 // BASIC-SAME: <2 x half> noundef [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef [[C_COERCE:%.*]]) #[[ATTR0]] {
837 // BASIC-NEXT: entry:
838 // BASIC-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
839 // BASIC-NEXT: [[A:%.*]] = alloca { half, half }, align 2
840 // BASIC-NEXT: [[C:%.*]] = alloca { half, half }, align 2
841 // BASIC-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
842 // BASIC-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
843 // BASIC-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
844 // BASIC-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
845 // BASIC-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
846 // BASIC-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
847 // BASIC-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
848 // BASIC-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
849 // BASIC-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
850 // BASIC-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
851 // BASIC-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
852 // BASIC-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
853 // BASIC-NEXT: [[TMP0:%.*]] = fmul x86_fp80 [[B_REAL]], [[CONV]]
854 // BASIC-NEXT: [[TMP1:%.*]] = fmul x86_fp80 [[B_IMAG]], [[CONV1]]
855 // BASIC-NEXT: [[TMP2:%.*]] = fadd x86_fp80 [[TMP0]], [[TMP1]]
856 // BASIC-NEXT: [[TMP3:%.*]] = fmul x86_fp80 [[CONV]], [[CONV]]
857 // BASIC-NEXT: [[TMP4:%.*]] = fmul x86_fp80 [[CONV1]], [[CONV1]]
858 // BASIC-NEXT: [[TMP5:%.*]] = fadd x86_fp80 [[TMP3]], [[TMP4]]
859 // BASIC-NEXT: [[TMP6:%.*]] = fmul x86_fp80 [[B_IMAG]], [[CONV]]
860 // BASIC-NEXT: [[TMP7:%.*]] = fmul x86_fp80 [[B_REAL]], [[CONV1]]
861 // BASIC-NEXT: [[TMP8:%.*]] = fsub x86_fp80 [[TMP6]], [[TMP7]]
862 // BASIC-NEXT: [[TMP9:%.*]] = fdiv x86_fp80 [[TMP2]], [[TMP5]]
863 // BASIC-NEXT: [[TMP10:%.*]] = fdiv x86_fp80 [[TMP8]], [[TMP5]]
864 // BASIC-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP9]] to half
865 // BASIC-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP10]] to half
866 // BASIC-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
867 // BASIC-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
868 // BASIC-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
869 // BASIC-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
870 // BASIC-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
871 // BASIC-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
872 // BASIC-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
873 // BASIC-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
874 // BASIC-NEXT: [[TMP11:%.*]] = fmul float [[EXT]], [[EXT5]]
875 // BASIC-NEXT: [[TMP12:%.*]] = fmul float [[EXT4]], [[EXT6]]
876 // BASIC-NEXT: [[TMP13:%.*]] = fadd float [[TMP11]], [[TMP12]]
877 // BASIC-NEXT: [[TMP14:%.*]] = fmul float [[EXT5]], [[EXT5]]
878 // BASIC-NEXT: [[TMP15:%.*]] = fmul float [[EXT6]], [[EXT6]]
879 // BASIC-NEXT: [[TMP16:%.*]] = fadd float [[TMP14]], [[TMP15]]
880 // BASIC-NEXT: [[TMP17:%.*]] = fmul float [[EXT4]], [[EXT5]]
881 // BASIC-NEXT: [[TMP18:%.*]] = fmul float [[EXT]], [[EXT6]]
882 // BASIC-NEXT: [[TMP19:%.*]] = fsub float [[TMP17]], [[TMP18]]
883 // BASIC-NEXT: [[TMP20:%.*]] = fdiv float [[TMP13]], [[TMP16]]
884 // BASIC-NEXT: [[TMP21:%.*]] = fdiv float [[TMP19]], [[TMP16]]
885 // BASIC-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP20]] to half
886 // BASIC-NEXT: [[UNPROMOTION7:%.*]] = fptrunc float [[TMP21]] to half
887 // BASIC-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
888 // BASIC-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
889 // BASIC-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
890 // BASIC-NEXT: store half [[UNPROMOTION7]], ptr [[RETVAL_IMAGP]], align 2
891 // BASIC-NEXT: [[TMP22:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
892 // BASIC-NEXT: ret <2 x half> [[TMP22]]
894 // IMPRVD-LABEL: define dso_local <2 x half> @f1(
895 // IMPRVD-SAME: <2 x half> noundef [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef [[C_COERCE:%.*]]) #[[ATTR0]] {
896 // IMPRVD-NEXT: entry:
897 // IMPRVD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
898 // IMPRVD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
899 // IMPRVD-NEXT: [[C:%.*]] = alloca { half, half }, align 2
900 // IMPRVD-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
901 // IMPRVD-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
902 // IMPRVD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
903 // IMPRVD-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
904 // IMPRVD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
905 // IMPRVD-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
906 // IMPRVD-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
907 // IMPRVD-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
908 // IMPRVD-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
909 // IMPRVD-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
910 // IMPRVD-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
911 // IMPRVD-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
912 // IMPRVD-NEXT: [[TMP0:%.*]] = call x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV]])
913 // IMPRVD-NEXT: [[TMP1:%.*]] = call x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV1]])
914 // IMPRVD-NEXT: [[ABS_CMP:%.*]] = fcmp ugt x86_fp80 [[TMP0]], [[TMP1]]
915 // IMPRVD-NEXT: br i1 [[ABS_CMP]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI:%.*]]
916 // IMPRVD: abs_rhsr_greater_or_equal_abs_rhsi:
917 // IMPRVD-NEXT: [[TMP2:%.*]] = fdiv x86_fp80 [[CONV1]], [[CONV]]
918 // IMPRVD-NEXT: [[TMP3:%.*]] = fmul x86_fp80 [[TMP2]], [[CONV1]]
919 // IMPRVD-NEXT: [[TMP4:%.*]] = fadd x86_fp80 [[CONV]], [[TMP3]]
920 // IMPRVD-NEXT: [[TMP5:%.*]] = fmul x86_fp80 [[B_IMAG]], [[TMP2]]
921 // IMPRVD-NEXT: [[TMP6:%.*]] = fadd x86_fp80 [[B_REAL]], [[TMP5]]
922 // IMPRVD-NEXT: [[TMP7:%.*]] = fdiv x86_fp80 [[TMP6]], [[TMP4]]
923 // IMPRVD-NEXT: [[TMP8:%.*]] = fmul x86_fp80 [[B_REAL]], [[TMP2]]
924 // IMPRVD-NEXT: [[TMP9:%.*]] = fsub x86_fp80 [[B_IMAG]], [[TMP8]]
925 // IMPRVD-NEXT: [[TMP10:%.*]] = fdiv x86_fp80 [[TMP9]], [[TMP4]]
926 // IMPRVD-NEXT: br label [[COMPLEX_DIV:%.*]]
927 // IMPRVD: abs_rhsr_less_than_abs_rhsi:
928 // IMPRVD-NEXT: [[TMP11:%.*]] = fdiv x86_fp80 [[CONV]], [[CONV1]]
929 // IMPRVD-NEXT: [[TMP12:%.*]] = fmul x86_fp80 [[TMP11]], [[CONV]]
930 // IMPRVD-NEXT: [[TMP13:%.*]] = fadd x86_fp80 [[CONV1]], [[TMP12]]
931 // IMPRVD-NEXT: [[TMP14:%.*]] = fmul x86_fp80 [[B_REAL]], [[TMP11]]
932 // IMPRVD-NEXT: [[TMP15:%.*]] = fadd x86_fp80 [[TMP14]], [[B_IMAG]]
933 // IMPRVD-NEXT: [[TMP16:%.*]] = fdiv x86_fp80 [[TMP15]], [[TMP13]]
934 // IMPRVD-NEXT: [[TMP17:%.*]] = fmul x86_fp80 [[B_IMAG]], [[TMP11]]
935 // IMPRVD-NEXT: [[TMP18:%.*]] = fsub x86_fp80 [[TMP17]], [[B_REAL]]
936 // IMPRVD-NEXT: [[TMP19:%.*]] = fdiv x86_fp80 [[TMP18]], [[TMP13]]
937 // IMPRVD-NEXT: br label [[COMPLEX_DIV]]
938 // IMPRVD: complex_div:
939 // IMPRVD-NEXT: [[TMP20:%.*]] = phi x86_fp80 [ [[TMP7]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP16]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
940 // IMPRVD-NEXT: [[TMP21:%.*]] = phi x86_fp80 [ [[TMP10]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP19]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
941 // IMPRVD-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP20]] to half
942 // IMPRVD-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP21]] to half
943 // IMPRVD-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
944 // IMPRVD-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
945 // IMPRVD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
946 // IMPRVD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
947 // IMPRVD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
948 // IMPRVD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
949 // IMPRVD-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
950 // IMPRVD-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
951 // IMPRVD-NEXT: [[TMP22:%.*]] = call float @llvm.fabs.f32(float [[EXT5]])
952 // IMPRVD-NEXT: [[TMP23:%.*]] = call float @llvm.fabs.f32(float [[EXT6]])
953 // IMPRVD-NEXT: [[ABS_CMP7:%.*]] = fcmp ugt float [[TMP22]], [[TMP23]]
954 // IMPRVD-NEXT: br i1 [[ABS_CMP7]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI8:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI9:%.*]]
955 // IMPRVD: abs_rhsr_greater_or_equal_abs_rhsi8:
956 // IMPRVD-NEXT: [[TMP24:%.*]] = fdiv float [[EXT6]], [[EXT5]]
957 // IMPRVD-NEXT: [[TMP25:%.*]] = fmul float [[TMP24]], [[EXT6]]
958 // IMPRVD-NEXT: [[TMP26:%.*]] = fadd float [[EXT5]], [[TMP25]]
959 // IMPRVD-NEXT: [[TMP27:%.*]] = fmul float [[EXT4]], [[TMP24]]
960 // IMPRVD-NEXT: [[TMP28:%.*]] = fadd float [[EXT]], [[TMP27]]
961 // IMPRVD-NEXT: [[TMP29:%.*]] = fdiv float [[TMP28]], [[TMP26]]
962 // IMPRVD-NEXT: [[TMP30:%.*]] = fmul float [[EXT]], [[TMP24]]
963 // IMPRVD-NEXT: [[TMP31:%.*]] = fsub float [[EXT4]], [[TMP30]]
964 // IMPRVD-NEXT: [[TMP32:%.*]] = fdiv float [[TMP31]], [[TMP26]]
965 // IMPRVD-NEXT: br label [[COMPLEX_DIV10:%.*]]
966 // IMPRVD: abs_rhsr_less_than_abs_rhsi9:
967 // IMPRVD-NEXT: [[TMP33:%.*]] = fdiv float [[EXT5]], [[EXT6]]
968 // IMPRVD-NEXT: [[TMP34:%.*]] = fmul float [[TMP33]], [[EXT5]]
969 // IMPRVD-NEXT: [[TMP35:%.*]] = fadd float [[EXT6]], [[TMP34]]
970 // IMPRVD-NEXT: [[TMP36:%.*]] = fmul float [[EXT]], [[TMP33]]
971 // IMPRVD-NEXT: [[TMP37:%.*]] = fadd float [[TMP36]], [[EXT4]]
972 // IMPRVD-NEXT: [[TMP38:%.*]] = fdiv float [[TMP37]], [[TMP35]]
973 // IMPRVD-NEXT: [[TMP39:%.*]] = fmul float [[EXT4]], [[TMP33]]
974 // IMPRVD-NEXT: [[TMP40:%.*]] = fsub float [[TMP39]], [[EXT]]
975 // IMPRVD-NEXT: [[TMP41:%.*]] = fdiv float [[TMP40]], [[TMP35]]
976 // IMPRVD-NEXT: br label [[COMPLEX_DIV10]]
977 // IMPRVD: complex_div10:
978 // IMPRVD-NEXT: [[TMP42:%.*]] = phi float [ [[TMP29]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI8]] ], [ [[TMP38]], [[ABS_RHSR_LESS_THAN_ABS_RHSI9]] ]
979 // IMPRVD-NEXT: [[TMP43:%.*]] = phi float [ [[TMP32]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI8]] ], [ [[TMP41]], [[ABS_RHSR_LESS_THAN_ABS_RHSI9]] ]
980 // IMPRVD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP42]] to half
981 // IMPRVD-NEXT: [[UNPROMOTION11:%.*]] = fptrunc float [[TMP43]] to half
982 // IMPRVD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
983 // IMPRVD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
984 // IMPRVD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
985 // IMPRVD-NEXT: store half [[UNPROMOTION11]], ptr [[RETVAL_IMAGP]], align 2
986 // IMPRVD-NEXT: [[TMP44:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
987 // IMPRVD-NEXT: ret <2 x half> [[TMP44]]
989 // PRMTD-LABEL: define dso_local <2 x half> @f1(
990 // PRMTD-SAME: <2 x half> noundef [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef [[C_COERCE:%.*]]) #[[ATTR0]] {
991 // PRMTD-NEXT: entry:
992 // PRMTD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
993 // PRMTD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
994 // PRMTD-NEXT: [[C:%.*]] = alloca { half, half }, align 2
995 // PRMTD-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
996 // PRMTD-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
997 // PRMTD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
998 // PRMTD-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
999 // PRMTD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
1000 // PRMTD-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
1001 // PRMTD-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
1002 // PRMTD-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
1003 // PRMTD-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
1004 // PRMTD-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
1005 // PRMTD-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
1006 // PRMTD-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
1007 // PRMTD-NEXT: [[TMP0:%.*]] = call x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV]])
1008 // PRMTD-NEXT: [[TMP1:%.*]] = call x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV1]])
1009 // PRMTD-NEXT: [[ABS_CMP:%.*]] = fcmp ugt x86_fp80 [[TMP0]], [[TMP1]]
1010 // PRMTD-NEXT: br i1 [[ABS_CMP]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI:%.*]]
1011 // PRMTD: abs_rhsr_greater_or_equal_abs_rhsi:
1012 // PRMTD-NEXT: [[TMP2:%.*]] = fdiv x86_fp80 [[CONV1]], [[CONV]]
1013 // PRMTD-NEXT: [[TMP3:%.*]] = fmul x86_fp80 [[TMP2]], [[CONV1]]
1014 // PRMTD-NEXT: [[TMP4:%.*]] = fadd x86_fp80 [[CONV]], [[TMP3]]
1015 // PRMTD-NEXT: [[TMP5:%.*]] = fmul x86_fp80 [[B_IMAG]], [[TMP2]]
1016 // PRMTD-NEXT: [[TMP6:%.*]] = fadd x86_fp80 [[B_REAL]], [[TMP5]]
1017 // PRMTD-NEXT: [[TMP7:%.*]] = fdiv x86_fp80 [[TMP6]], [[TMP4]]
1018 // PRMTD-NEXT: [[TMP8:%.*]] = fmul x86_fp80 [[B_REAL]], [[TMP2]]
1019 // PRMTD-NEXT: [[TMP9:%.*]] = fsub x86_fp80 [[B_IMAG]], [[TMP8]]
1020 // PRMTD-NEXT: [[TMP10:%.*]] = fdiv x86_fp80 [[TMP9]], [[TMP4]]
1021 // PRMTD-NEXT: br label [[COMPLEX_DIV:%.*]]
1022 // PRMTD: abs_rhsr_less_than_abs_rhsi:
1023 // PRMTD-NEXT: [[TMP11:%.*]] = fdiv x86_fp80 [[CONV]], [[CONV1]]
1024 // PRMTD-NEXT: [[TMP12:%.*]] = fmul x86_fp80 [[TMP11]], [[CONV]]
1025 // PRMTD-NEXT: [[TMP13:%.*]] = fadd x86_fp80 [[CONV1]], [[TMP12]]
1026 // PRMTD-NEXT: [[TMP14:%.*]] = fmul x86_fp80 [[B_REAL]], [[TMP11]]
1027 // PRMTD-NEXT: [[TMP15:%.*]] = fadd x86_fp80 [[TMP14]], [[B_IMAG]]
1028 // PRMTD-NEXT: [[TMP16:%.*]] = fdiv x86_fp80 [[TMP15]], [[TMP13]]
1029 // PRMTD-NEXT: [[TMP17:%.*]] = fmul x86_fp80 [[B_IMAG]], [[TMP11]]
1030 // PRMTD-NEXT: [[TMP18:%.*]] = fsub x86_fp80 [[TMP17]], [[B_REAL]]
1031 // PRMTD-NEXT: [[TMP19:%.*]] = fdiv x86_fp80 [[TMP18]], [[TMP13]]
1032 // PRMTD-NEXT: br label [[COMPLEX_DIV]]
1033 // PRMTD: complex_div:
1034 // PRMTD-NEXT: [[TMP20:%.*]] = phi x86_fp80 [ [[TMP7]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP16]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1035 // PRMTD-NEXT: [[TMP21:%.*]] = phi x86_fp80 [ [[TMP10]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP19]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1036 // PRMTD-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP20]] to half
1037 // PRMTD-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP21]] to half
1038 // PRMTD-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
1039 // PRMTD-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
1040 // PRMTD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
1041 // PRMTD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
1042 // PRMTD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
1043 // PRMTD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
1044 // PRMTD-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
1045 // PRMTD-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
1046 // PRMTD-NEXT: [[TMP22:%.*]] = fmul float [[EXT]], [[EXT5]]
1047 // PRMTD-NEXT: [[TMP23:%.*]] = fmul float [[EXT4]], [[EXT6]]
1048 // PRMTD-NEXT: [[TMP24:%.*]] = fadd float [[TMP22]], [[TMP23]]
1049 // PRMTD-NEXT: [[TMP25:%.*]] = fmul float [[EXT5]], [[EXT5]]
1050 // PRMTD-NEXT: [[TMP26:%.*]] = fmul float [[EXT6]], [[EXT6]]
1051 // PRMTD-NEXT: [[TMP27:%.*]] = fadd float [[TMP25]], [[TMP26]]
1052 // PRMTD-NEXT: [[TMP28:%.*]] = fmul float [[EXT4]], [[EXT5]]
1053 // PRMTD-NEXT: [[TMP29:%.*]] = fmul float [[EXT]], [[EXT6]]
1054 // PRMTD-NEXT: [[TMP30:%.*]] = fsub float [[TMP28]], [[TMP29]]
1055 // PRMTD-NEXT: [[TMP31:%.*]] = fdiv float [[TMP24]], [[TMP27]]
1056 // PRMTD-NEXT: [[TMP32:%.*]] = fdiv float [[TMP30]], [[TMP27]]
1057 // PRMTD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP31]] to half
1058 // PRMTD-NEXT: [[UNPROMOTION7:%.*]] = fptrunc float [[TMP32]] to half
1059 // PRMTD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
1060 // PRMTD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
1061 // PRMTD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
1062 // PRMTD-NEXT: store half [[UNPROMOTION7]], ptr [[RETVAL_IMAGP]], align 2
1063 // PRMTD-NEXT: [[TMP33:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
1064 // PRMTD-NEXT: ret <2 x half> [[TMP33]]
1066 // X86WINPRMTD-LABEL: define dso_local i32 @f1(
1067 // X86WINPRMTD-SAME: i32 noundef [[A_COERCE:%.*]], ptr noundef [[B:%.*]], i32 noundef [[C_COERCE:%.*]]) #[[ATTR0]] {
1068 // X86WINPRMTD-NEXT: entry:
1069 // X86WINPRMTD-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
1070 // X86WINPRMTD-NEXT: [[A:%.*]] = alloca { half, half }, align 2
1071 // X86WINPRMTD-NEXT: [[C:%.*]] = alloca { half, half }, align 2
1072 // X86WINPRMTD-NEXT: [[B_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
1073 // X86WINPRMTD-NEXT: store i32 [[A_COERCE]], ptr [[A]], align 2
1074 // X86WINPRMTD-NEXT: store i32 [[C_COERCE]], ptr [[C]], align 2
1075 // X86WINPRMTD-NEXT: store ptr [[B]], ptr [[B_INDIRECT_ADDR]], align 8
1076 // X86WINPRMTD-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { double, double }, ptr [[B]], i32 0, i32 0
1077 // X86WINPRMTD-NEXT: [[B_REAL:%.*]] = load double, ptr [[B_REALP]], align 8
1078 // X86WINPRMTD-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { double, double }, ptr [[B]], i32 0, i32 1
1079 // X86WINPRMTD-NEXT: [[B_IMAG:%.*]] = load double, ptr [[B_IMAGP]], align 8
1080 // X86WINPRMTD-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
1081 // X86WINPRMTD-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
1082 // X86WINPRMTD-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
1083 // X86WINPRMTD-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
1084 // X86WINPRMTD-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to double
1085 // X86WINPRMTD-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to double
1086 // X86WINPRMTD-NEXT: [[TMP0:%.*]] = call double @llvm.fabs.f64(double [[CONV]])
1087 // X86WINPRMTD-NEXT: [[TMP1:%.*]] = call double @llvm.fabs.f64(double [[CONV1]])
1088 // X86WINPRMTD-NEXT: [[ABS_CMP:%.*]] = fcmp ugt double [[TMP0]], [[TMP1]]
1089 // X86WINPRMTD-NEXT: br i1 [[ABS_CMP]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI:%.*]]
1090 // X86WINPRMTD: abs_rhsr_greater_or_equal_abs_rhsi:
1091 // X86WINPRMTD-NEXT: [[TMP2:%.*]] = fdiv double [[CONV1]], [[CONV]]
1092 // X86WINPRMTD-NEXT: [[TMP3:%.*]] = fmul double [[TMP2]], [[CONV1]]
1093 // X86WINPRMTD-NEXT: [[TMP4:%.*]] = fadd double [[CONV]], [[TMP3]]
1094 // X86WINPRMTD-NEXT: [[TMP5:%.*]] = fmul double [[B_IMAG]], [[TMP2]]
1095 // X86WINPRMTD-NEXT: [[TMP6:%.*]] = fadd double [[B_REAL]], [[TMP5]]
1096 // X86WINPRMTD-NEXT: [[TMP7:%.*]] = fdiv double [[TMP6]], [[TMP4]]
1097 // X86WINPRMTD-NEXT: [[TMP8:%.*]] = fmul double [[B_REAL]], [[TMP2]]
1098 // X86WINPRMTD-NEXT: [[TMP9:%.*]] = fsub double [[B_IMAG]], [[TMP8]]
1099 // X86WINPRMTD-NEXT: [[TMP10:%.*]] = fdiv double [[TMP9]], [[TMP4]]
1100 // X86WINPRMTD-NEXT: br label [[COMPLEX_DIV:%.*]]
1101 // X86WINPRMTD: abs_rhsr_less_than_abs_rhsi:
1102 // X86WINPRMTD-NEXT: [[TMP11:%.*]] = fdiv double [[CONV]], [[CONV1]]
1103 // X86WINPRMTD-NEXT: [[TMP12:%.*]] = fmul double [[TMP11]], [[CONV]]
1104 // X86WINPRMTD-NEXT: [[TMP13:%.*]] = fadd double [[CONV1]], [[TMP12]]
1105 // X86WINPRMTD-NEXT: [[TMP14:%.*]] = fmul double [[B_REAL]], [[TMP11]]
1106 // X86WINPRMTD-NEXT: [[TMP15:%.*]] = fadd double [[TMP14]], [[B_IMAG]]
1107 // X86WINPRMTD-NEXT: [[TMP16:%.*]] = fdiv double [[TMP15]], [[TMP13]]
1108 // X86WINPRMTD-NEXT: [[TMP17:%.*]] = fmul double [[B_IMAG]], [[TMP11]]
1109 // X86WINPRMTD-NEXT: [[TMP18:%.*]] = fsub double [[TMP17]], [[B_REAL]]
1110 // X86WINPRMTD-NEXT: [[TMP19:%.*]] = fdiv double [[TMP18]], [[TMP13]]
1111 // X86WINPRMTD-NEXT: br label [[COMPLEX_DIV]]
1112 // X86WINPRMTD: complex_div:
1113 // X86WINPRMTD-NEXT: [[TMP20:%.*]] = phi double [ [[TMP7]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP16]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1114 // X86WINPRMTD-NEXT: [[TMP21:%.*]] = phi double [ [[TMP10]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP19]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1115 // X86WINPRMTD-NEXT: [[CONV2:%.*]] = fptrunc double [[TMP20]] to half
1116 // X86WINPRMTD-NEXT: [[CONV3:%.*]] = fptrunc double [[TMP21]] to half
1117 // X86WINPRMTD-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
1118 // X86WINPRMTD-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
1119 // X86WINPRMTD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
1120 // X86WINPRMTD-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
1121 // X86WINPRMTD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
1122 // X86WINPRMTD-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
1123 // X86WINPRMTD-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
1124 // X86WINPRMTD-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
1125 // X86WINPRMTD-NEXT: [[TMP22:%.*]] = fmul float [[EXT]], [[EXT5]]
1126 // X86WINPRMTD-NEXT: [[TMP23:%.*]] = fmul float [[EXT4]], [[EXT6]]
1127 // X86WINPRMTD-NEXT: [[TMP24:%.*]] = fadd float [[TMP22]], [[TMP23]]
1128 // X86WINPRMTD-NEXT: [[TMP25:%.*]] = fmul float [[EXT5]], [[EXT5]]
1129 // X86WINPRMTD-NEXT: [[TMP26:%.*]] = fmul float [[EXT6]], [[EXT6]]
1130 // X86WINPRMTD-NEXT: [[TMP27:%.*]] = fadd float [[TMP25]], [[TMP26]]
1131 // X86WINPRMTD-NEXT: [[TMP28:%.*]] = fmul float [[EXT4]], [[EXT5]]
1132 // X86WINPRMTD-NEXT: [[TMP29:%.*]] = fmul float [[EXT]], [[EXT6]]
1133 // X86WINPRMTD-NEXT: [[TMP30:%.*]] = fsub float [[TMP28]], [[TMP29]]
1134 // X86WINPRMTD-NEXT: [[TMP31:%.*]] = fdiv float [[TMP24]], [[TMP27]]
1135 // X86WINPRMTD-NEXT: [[TMP32:%.*]] = fdiv float [[TMP30]], [[TMP27]]
1136 // X86WINPRMTD-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP31]] to half
1137 // X86WINPRMTD-NEXT: [[UNPROMOTION7:%.*]] = fptrunc float [[TMP32]] to half
1138 // X86WINPRMTD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
1139 // X86WINPRMTD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
1140 // X86WINPRMTD-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
1141 // X86WINPRMTD-NEXT: store half [[UNPROMOTION7]], ptr [[RETVAL_IMAGP]], align 2
1142 // X86WINPRMTD-NEXT: [[TMP33:%.*]] = load i32, ptr [[RETVAL]], align 2
1143 // X86WINPRMTD-NEXT: ret i32 [[TMP33]]
1145 // BASIC_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @f1(
1146 // BASIC_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) #[[ATTR0]] {
1147 // BASIC_FAST-NEXT: entry:
1148 // BASIC_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
1149 // BASIC_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
1150 // BASIC_FAST-NEXT: [[C:%.*]] = alloca { half, half }, align 2
1151 // BASIC_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
1152 // BASIC_FAST-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
1153 // BASIC_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
1154 // BASIC_FAST-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
1155 // BASIC_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
1156 // BASIC_FAST-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
1157 // BASIC_FAST-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
1158 // BASIC_FAST-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
1159 // BASIC_FAST-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
1160 // BASIC_FAST-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
1161 // BASIC_FAST-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
1162 // BASIC_FAST-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
1163 // BASIC_FAST-NEXT: [[TMP0:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[CONV]]
1164 // BASIC_FAST-NEXT: [[TMP1:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[CONV1]]
1165 // BASIC_FAST-NEXT: [[TMP2:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP0]], [[TMP1]]
1166 // BASIC_FAST-NEXT: [[TMP3:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV]], [[CONV]]
1167 // BASIC_FAST-NEXT: [[TMP4:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV1]], [[CONV1]]
1168 // BASIC_FAST-NEXT: [[TMP5:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP3]], [[TMP4]]
1169 // BASIC_FAST-NEXT: [[TMP6:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[CONV]]
1170 // BASIC_FAST-NEXT: [[TMP7:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[CONV1]]
1171 // BASIC_FAST-NEXT: [[TMP8:%.*]] = fsub reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP6]], [[TMP7]]
1172 // BASIC_FAST-NEXT: [[TMP9:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP2]], [[TMP5]]
1173 // BASIC_FAST-NEXT: [[TMP10:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP8]], [[TMP5]]
1174 // BASIC_FAST-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP9]] to half
1175 // BASIC_FAST-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP10]] to half
1176 // BASIC_FAST-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
1177 // BASIC_FAST-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
1178 // BASIC_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
1179 // BASIC_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
1180 // BASIC_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
1181 // BASIC_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
1182 // BASIC_FAST-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
1183 // BASIC_FAST-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
1184 // BASIC_FAST-NEXT: [[TMP11:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT5]]
1185 // BASIC_FAST-NEXT: [[TMP12:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT4]], [[EXT6]]
1186 // BASIC_FAST-NEXT: [[TMP13:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP11]], [[TMP12]]
1187 // BASIC_FAST-NEXT: [[TMP14:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT5]], [[EXT5]]
1188 // BASIC_FAST-NEXT: [[TMP15:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT6]], [[EXT6]]
1189 // BASIC_FAST-NEXT: [[TMP16:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP14]], [[TMP15]]
1190 // BASIC_FAST-NEXT: [[TMP17:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT4]], [[EXT5]]
1191 // BASIC_FAST-NEXT: [[TMP18:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT6]]
1192 // BASIC_FAST-NEXT: [[TMP19:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[TMP17]], [[TMP18]]
1193 // BASIC_FAST-NEXT: [[TMP20:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP13]], [[TMP16]]
1194 // BASIC_FAST-NEXT: [[TMP21:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP19]], [[TMP16]]
1195 // BASIC_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP20]] to half
1196 // BASIC_FAST-NEXT: [[UNPROMOTION7:%.*]] = fptrunc float [[TMP21]] to half
1197 // BASIC_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
1198 // BASIC_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
1199 // BASIC_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
1200 // BASIC_FAST-NEXT: store half [[UNPROMOTION7]], ptr [[RETVAL_IMAGP]], align 2
1201 // BASIC_FAST-NEXT: [[TMP22:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
1202 // BASIC_FAST-NEXT: ret <2 x half> [[TMP22]]
1204 // FULL_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @f1(
1205 // FULL_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) #[[ATTR0]] {
1206 // FULL_FAST-NEXT: entry:
1207 // FULL_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
1208 // FULL_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
1209 // FULL_FAST-NEXT: [[C:%.*]] = alloca { half, half }, align 2
1210 // FULL_FAST-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
1211 // FULL_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
1212 // FULL_FAST-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
1213 // FULL_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
1214 // FULL_FAST-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
1215 // FULL_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
1216 // FULL_FAST-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
1217 // FULL_FAST-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
1218 // FULL_FAST-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
1219 // FULL_FAST-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
1220 // FULL_FAST-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
1221 // FULL_FAST-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
1222 // FULL_FAST-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
1223 // FULL_FAST-NEXT: [[CALL:%.*]] = call reassoc nnan ninf nsz arcp afn nofpclass(nan inf) { x86_fp80, x86_fp80 } @__divxc3(x86_fp80 noundef nofpclass(nan inf) [[B_REAL]], x86_fp80 noundef nofpclass(nan inf) [[B_IMAG]], x86_fp80 noundef nofpclass(nan inf) [[CONV]], x86_fp80 noundef nofpclass(nan inf) [[CONV1]]) #[[ATTR1]]
1224 // FULL_FAST-NEXT: [[TMP0:%.*]] = extractvalue { x86_fp80, x86_fp80 } [[CALL]], 0
1225 // FULL_FAST-NEXT: [[TMP1:%.*]] = extractvalue { x86_fp80, x86_fp80 } [[CALL]], 1
1226 // FULL_FAST-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP0]] to half
1227 // FULL_FAST-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP1]] to half
1228 // FULL_FAST-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
1229 // FULL_FAST-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
1230 // FULL_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
1231 // FULL_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
1232 // FULL_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
1233 // FULL_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
1234 // FULL_FAST-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
1235 // FULL_FAST-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
1236 // FULL_FAST-NEXT: [[CALL7:%.*]] = call reassoc nnan ninf nsz arcp afn nofpclass(nan inf) <2 x float> @__divsc3(float noundef nofpclass(nan inf) [[EXT]], float noundef nofpclass(nan inf) [[EXT4]], float noundef nofpclass(nan inf) [[EXT5]], float noundef nofpclass(nan inf) [[EXT6]]) #[[ATTR1]]
1237 // FULL_FAST-NEXT: store <2 x float> [[CALL7]], ptr [[COERCE]], align 4
1238 // FULL_FAST-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 0
1239 // FULL_FAST-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
1240 // FULL_FAST-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[COERCE]], i32 0, i32 1
1241 // FULL_FAST-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
1242 // FULL_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[COERCE_REAL]] to half
1243 // FULL_FAST-NEXT: [[UNPROMOTION8:%.*]] = fptrunc float [[COERCE_IMAG]] to half
1244 // FULL_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
1245 // FULL_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
1246 // FULL_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
1247 // FULL_FAST-NEXT: store half [[UNPROMOTION8]], ptr [[RETVAL_IMAGP]], align 2
1248 // FULL_FAST-NEXT: [[TMP2:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
1249 // FULL_FAST-NEXT: ret <2 x half> [[TMP2]]
1251 // IMPRVD_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @f1(
1252 // IMPRVD_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) #[[ATTR0]] {
1253 // IMPRVD_FAST-NEXT: entry:
1254 // IMPRVD_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
1255 // IMPRVD_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
1256 // IMPRVD_FAST-NEXT: [[C:%.*]] = alloca { half, half }, align 2
1257 // IMPRVD_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
1258 // IMPRVD_FAST-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
1259 // IMPRVD_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
1260 // IMPRVD_FAST-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
1261 // IMPRVD_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
1262 // IMPRVD_FAST-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
1263 // IMPRVD_FAST-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
1264 // IMPRVD_FAST-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
1265 // IMPRVD_FAST-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
1266 // IMPRVD_FAST-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
1267 // IMPRVD_FAST-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
1268 // IMPRVD_FAST-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
1269 // IMPRVD_FAST-NEXT: [[TMP0:%.*]] = call reassoc nnan ninf nsz arcp afn x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV]])
1270 // IMPRVD_FAST-NEXT: [[TMP1:%.*]] = call reassoc nnan ninf nsz arcp afn x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV1]])
1271 // IMPRVD_FAST-NEXT: [[ABS_CMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn ugt x86_fp80 [[TMP0]], [[TMP1]]
1272 // IMPRVD_FAST-NEXT: br i1 [[ABS_CMP]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI:%.*]]
1273 // IMPRVD_FAST: abs_rhsr_greater_or_equal_abs_rhsi:
1274 // IMPRVD_FAST-NEXT: [[TMP2:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV1]], [[CONV]]
1275 // IMPRVD_FAST-NEXT: [[TMP3:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP2]], [[CONV1]]
1276 // IMPRVD_FAST-NEXT: [[TMP4:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV]], [[TMP3]]
1277 // IMPRVD_FAST-NEXT: [[TMP5:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[TMP2]]
1278 // IMPRVD_FAST-NEXT: [[TMP6:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[TMP5]]
1279 // IMPRVD_FAST-NEXT: [[TMP7:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP6]], [[TMP4]]
1280 // IMPRVD_FAST-NEXT: [[TMP8:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[TMP2]]
1281 // IMPRVD_FAST-NEXT: [[TMP9:%.*]] = fsub reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[TMP8]]
1282 // IMPRVD_FAST-NEXT: [[TMP10:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP9]], [[TMP4]]
1283 // IMPRVD_FAST-NEXT: br label [[COMPLEX_DIV:%.*]]
1284 // IMPRVD_FAST: abs_rhsr_less_than_abs_rhsi:
1285 // IMPRVD_FAST-NEXT: [[TMP11:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV]], [[CONV1]]
1286 // IMPRVD_FAST-NEXT: [[TMP12:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP11]], [[CONV]]
1287 // IMPRVD_FAST-NEXT: [[TMP13:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV1]], [[TMP12]]
1288 // IMPRVD_FAST-NEXT: [[TMP14:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[TMP11]]
1289 // IMPRVD_FAST-NEXT: [[TMP15:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP14]], [[B_IMAG]]
1290 // IMPRVD_FAST-NEXT: [[TMP16:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP15]], [[TMP13]]
1291 // IMPRVD_FAST-NEXT: [[TMP17:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[TMP11]]
1292 // IMPRVD_FAST-NEXT: [[TMP18:%.*]] = fsub reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP17]], [[B_REAL]]
1293 // IMPRVD_FAST-NEXT: [[TMP19:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP18]], [[TMP13]]
1294 // IMPRVD_FAST-NEXT: br label [[COMPLEX_DIV]]
1295 // IMPRVD_FAST: complex_div:
1296 // IMPRVD_FAST-NEXT: [[TMP20:%.*]] = phi reassoc nnan ninf nsz arcp afn x86_fp80 [ [[TMP7]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP16]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1297 // IMPRVD_FAST-NEXT: [[TMP21:%.*]] = phi reassoc nnan ninf nsz arcp afn x86_fp80 [ [[TMP10]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP19]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1298 // IMPRVD_FAST-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP20]] to half
1299 // IMPRVD_FAST-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP21]] to half
1300 // IMPRVD_FAST-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
1301 // IMPRVD_FAST-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
1302 // IMPRVD_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
1303 // IMPRVD_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
1304 // IMPRVD_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
1305 // IMPRVD_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
1306 // IMPRVD_FAST-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
1307 // IMPRVD_FAST-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
1308 // IMPRVD_FAST-NEXT: [[TMP22:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.fabs.f32(float [[EXT5]])
1309 // IMPRVD_FAST-NEXT: [[TMP23:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.fabs.f32(float [[EXT6]])
1310 // IMPRVD_FAST-NEXT: [[ABS_CMP7:%.*]] = fcmp reassoc nnan ninf nsz arcp afn ugt float [[TMP22]], [[TMP23]]
1311 // IMPRVD_FAST-NEXT: br i1 [[ABS_CMP7]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI8:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI9:%.*]]
1312 // IMPRVD_FAST: abs_rhsr_greater_or_equal_abs_rhsi8:
1313 // IMPRVD_FAST-NEXT: [[TMP24:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[EXT6]], [[EXT5]]
1314 // IMPRVD_FAST-NEXT: [[TMP25:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[TMP24]], [[EXT6]]
1315 // IMPRVD_FAST-NEXT: [[TMP26:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[EXT5]], [[TMP25]]
1316 // IMPRVD_FAST-NEXT: [[TMP27:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT4]], [[TMP24]]
1317 // IMPRVD_FAST-NEXT: [[TMP28:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[EXT]], [[TMP27]]
1318 // IMPRVD_FAST-NEXT: [[TMP29:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP28]], [[TMP26]]
1319 // IMPRVD_FAST-NEXT: [[TMP30:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[TMP24]]
1320 // IMPRVD_FAST-NEXT: [[TMP31:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[EXT4]], [[TMP30]]
1321 // IMPRVD_FAST-NEXT: [[TMP32:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP31]], [[TMP26]]
1322 // IMPRVD_FAST-NEXT: br label [[COMPLEX_DIV10:%.*]]
1323 // IMPRVD_FAST: abs_rhsr_less_than_abs_rhsi9:
1324 // IMPRVD_FAST-NEXT: [[TMP33:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[EXT5]], [[EXT6]]
1325 // IMPRVD_FAST-NEXT: [[TMP34:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[TMP33]], [[EXT5]]
1326 // IMPRVD_FAST-NEXT: [[TMP35:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[EXT6]], [[TMP34]]
1327 // IMPRVD_FAST-NEXT: [[TMP36:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[TMP33]]
1328 // IMPRVD_FAST-NEXT: [[TMP37:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP36]], [[EXT4]]
1329 // IMPRVD_FAST-NEXT: [[TMP38:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP37]], [[TMP35]]
1330 // IMPRVD_FAST-NEXT: [[TMP39:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT4]], [[TMP33]]
1331 // IMPRVD_FAST-NEXT: [[TMP40:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[TMP39]], [[EXT]]
1332 // IMPRVD_FAST-NEXT: [[TMP41:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP40]], [[TMP35]]
1333 // IMPRVD_FAST-NEXT: br label [[COMPLEX_DIV10]]
1334 // IMPRVD_FAST: complex_div10:
1335 // IMPRVD_FAST-NEXT: [[TMP42:%.*]] = phi reassoc nnan ninf nsz arcp afn float [ [[TMP29]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI8]] ], [ [[TMP38]], [[ABS_RHSR_LESS_THAN_ABS_RHSI9]] ]
1336 // IMPRVD_FAST-NEXT: [[TMP43:%.*]] = phi reassoc nnan ninf nsz arcp afn float [ [[TMP32]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI8]] ], [ [[TMP41]], [[ABS_RHSR_LESS_THAN_ABS_RHSI9]] ]
1337 // IMPRVD_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP42]] to half
1338 // IMPRVD_FAST-NEXT: [[UNPROMOTION11:%.*]] = fptrunc float [[TMP43]] to half
1339 // IMPRVD_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
1340 // IMPRVD_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
1341 // IMPRVD_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
1342 // IMPRVD_FAST-NEXT: store half [[UNPROMOTION11]], ptr [[RETVAL_IMAGP]], align 2
1343 // IMPRVD_FAST-NEXT: [[TMP44:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
1344 // IMPRVD_FAST-NEXT: ret <2 x half> [[TMP44]]
1346 // PRMTD_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x half> @f1(
1347 // PRMTD_FAST-SAME: <2 x half> noundef nofpclass(nan inf) [[A_COERCE:%.*]], ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 [[B:%.*]], <2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) #[[ATTR0]] {
1348 // PRMTD_FAST-NEXT: entry:
1349 // PRMTD_FAST-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
1350 // PRMTD_FAST-NEXT: [[A:%.*]] = alloca { half, half }, align 2
1351 // PRMTD_FAST-NEXT: [[C:%.*]] = alloca { half, half }, align 2
1352 // PRMTD_FAST-NEXT: store <2 x half> [[A_COERCE]], ptr [[A]], align 2
1353 // PRMTD_FAST-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
1354 // PRMTD_FAST-NEXT: [[B_REALP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 0
1355 // PRMTD_FAST-NEXT: [[B_REAL:%.*]] = load x86_fp80, ptr [[B_REALP]], align 16
1356 // PRMTD_FAST-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds nuw { x86_fp80, x86_fp80 }, ptr [[B]], i32 0, i32 1
1357 // PRMTD_FAST-NEXT: [[B_IMAG:%.*]] = load x86_fp80, ptr [[B_IMAGP]], align 16
1358 // PRMTD_FAST-NEXT: [[C_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 0
1359 // PRMTD_FAST-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
1360 // PRMTD_FAST-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[C]], i32 0, i32 1
1361 // PRMTD_FAST-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
1362 // PRMTD_FAST-NEXT: [[CONV:%.*]] = fpext half [[C_REAL]] to x86_fp80
1363 // PRMTD_FAST-NEXT: [[CONV1:%.*]] = fpext half [[C_IMAG]] to x86_fp80
1364 // PRMTD_FAST-NEXT: [[TMP0:%.*]] = call reassoc nnan ninf nsz arcp afn x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV]])
1365 // PRMTD_FAST-NEXT: [[TMP1:%.*]] = call reassoc nnan ninf nsz arcp afn x86_fp80 @llvm.fabs.f80(x86_fp80 [[CONV1]])
1366 // PRMTD_FAST-NEXT: [[ABS_CMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn ugt x86_fp80 [[TMP0]], [[TMP1]]
1367 // PRMTD_FAST-NEXT: br i1 [[ABS_CMP]], label [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI:%.*]], label [[ABS_RHSR_LESS_THAN_ABS_RHSI:%.*]]
1368 // PRMTD_FAST: abs_rhsr_greater_or_equal_abs_rhsi:
1369 // PRMTD_FAST-NEXT: [[TMP2:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV1]], [[CONV]]
1370 // PRMTD_FAST-NEXT: [[TMP3:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP2]], [[CONV1]]
1371 // PRMTD_FAST-NEXT: [[TMP4:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV]], [[TMP3]]
1372 // PRMTD_FAST-NEXT: [[TMP5:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[TMP2]]
1373 // PRMTD_FAST-NEXT: [[TMP6:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[TMP5]]
1374 // PRMTD_FAST-NEXT: [[TMP7:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP6]], [[TMP4]]
1375 // PRMTD_FAST-NEXT: [[TMP8:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[TMP2]]
1376 // PRMTD_FAST-NEXT: [[TMP9:%.*]] = fsub reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[TMP8]]
1377 // PRMTD_FAST-NEXT: [[TMP10:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP9]], [[TMP4]]
1378 // PRMTD_FAST-NEXT: br label [[COMPLEX_DIV:%.*]]
1379 // PRMTD_FAST: abs_rhsr_less_than_abs_rhsi:
1380 // PRMTD_FAST-NEXT: [[TMP11:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV]], [[CONV1]]
1381 // PRMTD_FAST-NEXT: [[TMP12:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP11]], [[CONV]]
1382 // PRMTD_FAST-NEXT: [[TMP13:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[CONV1]], [[TMP12]]
1383 // PRMTD_FAST-NEXT: [[TMP14:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_REAL]], [[TMP11]]
1384 // PRMTD_FAST-NEXT: [[TMP15:%.*]] = fadd reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP14]], [[B_IMAG]]
1385 // PRMTD_FAST-NEXT: [[TMP16:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP15]], [[TMP13]]
1386 // PRMTD_FAST-NEXT: [[TMP17:%.*]] = fmul reassoc nnan ninf nsz arcp afn x86_fp80 [[B_IMAG]], [[TMP11]]
1387 // PRMTD_FAST-NEXT: [[TMP18:%.*]] = fsub reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP17]], [[B_REAL]]
1388 // PRMTD_FAST-NEXT: [[TMP19:%.*]] = fdiv reassoc nnan ninf nsz arcp afn x86_fp80 [[TMP18]], [[TMP13]]
1389 // PRMTD_FAST-NEXT: br label [[COMPLEX_DIV]]
1390 // PRMTD_FAST: complex_div:
1391 // PRMTD_FAST-NEXT: [[TMP20:%.*]] = phi reassoc nnan ninf nsz arcp afn x86_fp80 [ [[TMP7]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP16]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1392 // PRMTD_FAST-NEXT: [[TMP21:%.*]] = phi reassoc nnan ninf nsz arcp afn x86_fp80 [ [[TMP10]], [[ABS_RHSR_GREATER_OR_EQUAL_ABS_RHSI]] ], [ [[TMP19]], [[ABS_RHSR_LESS_THAN_ABS_RHSI]] ]
1393 // PRMTD_FAST-NEXT: [[CONV2:%.*]] = fptrunc x86_fp80 [[TMP20]] to half
1394 // PRMTD_FAST-NEXT: [[CONV3:%.*]] = fptrunc x86_fp80 [[TMP21]] to half
1395 // PRMTD_FAST-NEXT: [[EXT:%.*]] = fpext half [[CONV2]] to float
1396 // PRMTD_FAST-NEXT: [[EXT4:%.*]] = fpext half [[CONV3]] to float
1397 // PRMTD_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 0
1398 // PRMTD_FAST-NEXT: [[A_REAL:%.*]] = load half, ptr [[A_REALP]], align 2
1399 // PRMTD_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[A]], i32 0, i32 1
1400 // PRMTD_FAST-NEXT: [[A_IMAG:%.*]] = load half, ptr [[A_IMAGP]], align 2
1401 // PRMTD_FAST-NEXT: [[EXT5:%.*]] = fpext half [[A_REAL]] to float
1402 // PRMTD_FAST-NEXT: [[EXT6:%.*]] = fpext half [[A_IMAG]] to float
1403 // PRMTD_FAST-NEXT: [[TMP22:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT5]]
1404 // PRMTD_FAST-NEXT: [[TMP23:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT4]], [[EXT6]]
1405 // PRMTD_FAST-NEXT: [[TMP24:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP22]], [[TMP23]]
1406 // PRMTD_FAST-NEXT: [[TMP25:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT5]], [[EXT5]]
1407 // PRMTD_FAST-NEXT: [[TMP26:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT6]], [[EXT6]]
1408 // PRMTD_FAST-NEXT: [[TMP27:%.*]] = fadd reassoc nnan ninf nsz arcp afn float [[TMP25]], [[TMP26]]
1409 // PRMTD_FAST-NEXT: [[TMP28:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT4]], [[EXT5]]
1410 // PRMTD_FAST-NEXT: [[TMP29:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[EXT]], [[EXT6]]
1411 // PRMTD_FAST-NEXT: [[TMP30:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[TMP28]], [[TMP29]]
1412 // PRMTD_FAST-NEXT: [[TMP31:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP24]], [[TMP27]]
1413 // PRMTD_FAST-NEXT: [[TMP32:%.*]] = fdiv reassoc nnan ninf nsz arcp afn float [[TMP30]], [[TMP27]]
1414 // PRMTD_FAST-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[TMP31]] to half
1415 // PRMTD_FAST-NEXT: [[UNPROMOTION7:%.*]] = fptrunc float [[TMP32]] to half
1416 // PRMTD_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 0
1417 // PRMTD_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { half, half }, ptr [[RETVAL]], i32 0, i32 1
1418 // PRMTD_FAST-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
1419 // PRMTD_FAST-NEXT: store half [[UNPROMOTION7]], ptr [[RETVAL_IMAGP]], align 2
1420 // PRMTD_FAST-NEXT: [[TMP33:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
1421 // PRMTD_FAST-NEXT: ret <2 x half> [[TMP33]]
1423 _Complex _Float16 f1(_Complex _Float16 a, _Complex long double b, _Complex _Float16 c) {
1424 return (_Complex _Float16)(b / c) / a;
1427 // FULL: [[PROF2]] = !{!"branch_weights", i32 1, i32 1048575}
1429 // FULL_FAST: [[PROF2]] = !{!"branch_weights", i32 1, i32 1048575}