Skip to content

Commit b136238

Browse files
committed
Add a test extracted from D69557 "AsmParser: Allow FMF on varargs call"
1 parent fef80a2 commit b136238

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

llvm/test/Assembler/fast-math-flags.ll

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,30 @@ entry:
189189
; CHECK: ret float %f
190190
ret float %f
191191
}
192+
193+
; CHECK: @fmf_calls(
194+
define float @fmf_calls(float %x, float %y) {
195+
entry:
196+
; CHECK: %vec = load <3 x float>, <3 x float>* @vec
197+
%vec = load <3 x float>, <3 x float>* @vec
198+
; CHECK: %select = load i1, i1* @select
199+
%select = load i1, i1* @select
200+
; CHECK: %arr = load [3 x float], [3 x float]* @arr
201+
%arr = load [3 x float], [3 x float]* @arr
202+
203+
; CHECK: %a = call nnan ninf afn float @extfunc(float %x, float %y)
204+
%a = call ninf nnan afn float @extfunc(float %x, float %y)
205+
; CHECK: %a_vec = call reassoc nnan <3 x float> @extfunc_vec(<3 x float> %vec, <3 x float> %vec)
206+
%a_vec = call reassoc nnan <3 x float> @extfunc_vec(<3 x float> %vec, <3 x float> %vec)
207+
; CHECK: %b = call nnan ninf afn float (...) @var_extfunc(float %x, float %y)
208+
%b = call ninf nnan afn float (...) @var_extfunc(float %x, float %y)
209+
; CHECK: %b_vec = call reassoc nnan <3 x float> (...) @var_extfunc_vec(<3 x float> %vec, <3 x float> %vec)
210+
%b_vec = call reassoc nnan <3 x float> (...) @var_extfunc_vec(<3 x float> %vec, <3 x float> %vec)
211+
; CHECK: ret float %a
212+
ret float %a
213+
}
214+
215+
declare float @extfunc(float, float)
216+
declare <3 x float> @extfunc_vec(<3 x float>, <3 x float>)
217+
declare float @var_extfunc(...)
218+
declare <3 x float> @var_extfunc_vec(...)

0 commit comments

Comments
 (0)