[pkg-d-commits] [ldc] 77/95: Fix inlineIR_math.d test. (#2063)
Matthias Klumpp
mak at moszumanska.debian.org
Thu Jul 13 20:54:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.
commit f98adfa8a3a30937c026184efdcab50211f19acd
Author: Johan Engelen <jbc.engelen at gmail.com>
Date: Sun Apr 9 09:23:00 2017 +0200
Fix inlineIR_math.d test. (#2063)
I don't know why the original test tests that fused mult-add is not emitted for these pieces, while at the same time specifying "fast" math on the operations.
---
tests/codegen/inlineIR_math.d | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/codegen/inlineIR_math.d b/tests/codegen/inlineIR_math.d
index 837fa34..888ecbe 100644
--- a/tests/codegen/inlineIR_math.d
+++ b/tests/codegen/inlineIR_math.d
@@ -58,8 +58,8 @@ extern (C) double dot160(double[160] a, double[160] b)
// ASM-NOT: vfmadd
foreach (size_t i; 0 .. a.length)
{
- s = inlineIR!(`%p = fmul fast double %0, %1
- %r = fadd fast double %p, %2
+ s = inlineIR!(`%p = fmul double %0, %1
+ %r = fadd double %p, %2
ret double %r`, double)(a[i], b[i], s);
}
return s;
@@ -69,6 +69,10 @@ extern (C) double dot160(double[160] a, double[160] b)
alias inlineIR!(`%p = fmul fast double %0, %1
%r = fadd fast double %p, %2
ret double %r`,
+ double, double, double, double) muladdFast;
+alias inlineIR!(`%p = fmul double %0, %1
+ %r = fadd double %p, %2
+ ret double %r`,
double, double, double, double) muladd;
// LLVM-LABEL: define{{.*}} @aliasInlineUnsafe
@@ -82,7 +86,7 @@ extern (C) double aliasInlineUnsafe(double[] a, double[] b)
// ASM: vfmadd{{[123][123][123]}}pd
foreach (size_t i; 0 .. a.length)
{
- s = muladd(a[i], b[i], s);
+ s = muladdFast(a[i], b[i], s);
}
return s;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list