[PATCH] D101844: [MicroBenchmarks] Add initial loop vectorization benchmarks.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 4 09:56:43 PDT 2021
lebedev.ri added inline comments.
================
Comment at: MicroBenchmarks/LoopVectorization/MathFunctions.cpp:54-55
+ // Treat nans/infs as matching, if both versions produce nan/inf.
+ if (C[i] != CNovec[i] && !(isnan(C[i]) && isnan(CNovec[i])) &&
+ !(isinf(C[i]) && isinf(CNovec[i]))) {
+ std::cerr << "ERROR: autovec result different to scalar result " << C[i]
----------------
I'm not confident this is
1. consistent with the rules
2. will withstand the whatever compiler optimization levels test-suite is compiled with
Perhaps you want to be on the safe side and do `fpclassify()`,
fail if they mismatch, and compare value-equality if they are normal/subnormal?
Repository:
rT test-suite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101844/new/
https://reviews.llvm.org/D101844
More information about the llvm-commits
mailing list