[PATCH] D138924: [test-suite][tsvc] Use fabs in s318 and s3113
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 01:11:12 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rT4138f35654ee: [TSVC] Use fabs in s318 and s3113 (authored by SjoerdMeijer).
Repository:
rT test-suite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138924/new/
https://reviews.llvm.org/D138924
Files:
MultiSource/Benchmarks/TSVC/tsc.inc
MultiSource/Benchmarks/TSVC/types.h
Index: MultiSource/Benchmarks/TSVC/types.h
===================================================================
--- MultiSource/Benchmarks/TSVC/types.h
+++ MultiSource/Benchmarks/TSVC/types.h
@@ -5,11 +5,14 @@
#define LEN2 256
#ifndef TYPE
-#define TYPE float
+ #define TYPE float
+ #define FABS(x) fabsf(x)
+#else
+ #define FABS(x) fabs(x)
#endif
#ifndef X_TYPE
-#define X_TYPE TYPE
+ #define X_TYPE TYPE
#endif
#ifndef ALIGNMENT
Index: MultiSource/Benchmarks/TSVC/tsc.inc
===================================================================
--- MultiSource/Benchmarks/TSVC/tsc.inc
+++ MultiSource/Benchmarks/TSVC/tsc.inc
@@ -3760,14 +3760,14 @@
for (int nl = 0; nl < ntimes/2; nl++) {
k = 0;
index = 0;
- max = abs(a[0]);
+ max = FABS(a[0]);
k += inc;
for (int i = 1; i < LEN; i++) {
- if (abs(a[k]) <= max) {
+ if (FABS(a[k]) <= max) {
goto L5;
}
index = i;
- max = abs(a[k]);
+ max = FABS(a[k]);
L5:
k += inc;
}
@@ -3971,10 +3971,10 @@
TYPE max;
for (int nl = 0; nl < ntimes*4; nl++) {
- max = abs(a[0]);
+ max = FABS(a[0]);
for (int i = 0; i < LEN; i++) {
- if ((abs(a[i])) > max) {
- max = abs(a[i]);
+ if ((FABS(a[i])) > max) {
+ max = FABS(a[i]);
}
}
dummy(a, b, c, d, e, aa, bb, cc, max);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138924.480012.patch
Type: text/x-patch
Size: 1288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/fa97a263/attachment.bin>
More information about the llvm-commits
mailing list