[llvm] b136238 - Add a test extracted from D69557 "AsmParser: Allow FMF on varargs call"
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 08:47:14 PST 2020
Author: Jay Foad
Date: 2020-01-29T16:46:45Z
New Revision: b136238bb4e502a46b720d6002cd5b7c248486c2
URL: https://github.com/llvm/llvm-project/commit/b136238bb4e502a46b720d6002cd5b7c248486c2
DIFF: https://github.com/llvm/llvm-project/commit/b136238bb4e502a46b720d6002cd5b7c248486c2.diff
LOG: Add a test extracted from D69557 "AsmParser: Allow FMF on varargs call"
Added:
Modified:
llvm/test/Assembler/fast-math-flags.ll
Removed:
################################################################################
diff --git a/llvm/test/Assembler/fast-math-flags.ll b/llvm/test/Assembler/fast-math-flags.ll
index 1af2320f0a10..37fd3fd9487d 100644
--- a/llvm/test/Assembler/fast-math-flags.ll
+++ b/llvm/test/Assembler/fast-math-flags.ll
@@ -189,3 +189,30 @@ entry:
; CHECK: ret float %f
ret float %f
}
+
+; CHECK: @fmf_calls(
+define float @fmf_calls(float %x, float %y) {
+entry:
+; CHECK: %vec = load <3 x float>, <3 x float>* @vec
+ %vec = load <3 x float>, <3 x float>* @vec
+; CHECK: %select = load i1, i1* @select
+ %select = load i1, i1* @select
+; CHECK: %arr = load [3 x float], [3 x float]* @arr
+ %arr = load [3 x float], [3 x float]* @arr
+
+; CHECK: %a = call nnan ninf afn float @extfunc(float %x, float %y)
+ %a = call ninf nnan afn float @extfunc(float %x, float %y)
+; CHECK: %a_vec = call reassoc nnan <3 x float> @extfunc_vec(<3 x float> %vec, <3 x float> %vec)
+ %a_vec = call reassoc nnan <3 x float> @extfunc_vec(<3 x float> %vec, <3 x float> %vec)
+; CHECK: %b = call nnan ninf afn float (...) @var_extfunc(float %x, float %y)
+ %b = call ninf nnan afn float (...) @var_extfunc(float %x, float %y)
+; CHECK: %b_vec = call reassoc nnan <3 x float> (...) @var_extfunc_vec(<3 x float> %vec, <3 x float> %vec)
+ %b_vec = call reassoc nnan <3 x float> (...) @var_extfunc_vec(<3 x float> %vec, <3 x float> %vec)
+; CHECK: ret float %a
+ ret float %a
+}
+
+declare float @extfunc(float, float)
+declare <3 x float> @extfunc_vec(<3 x float>, <3 x float>)
+declare float @var_extfunc(...)
+declare <3 x float> @var_extfunc_vec(...)
More information about the llvm-commits
mailing list