https://bugs.kde.org/show_bug.cgi?id=369000

--- Comment #2 from Mark Wielaard <m...@redhat.com> ---
Created attachment 101170
  --> https://bugs.kde.org/attachment.cgi?id=101170&action=edit
Testcases for fma4 instructions.

This is an extension of the testcases for the fma4 instructions I wrote for bug
#339596.

There are tests for the 128bit and 256 bit instructions, but the 256 bit
variants are disabled for now since they aren't yet implemented.

I looked at the testcase (none/tests/arm64/fp_and_simd.c) Julian pointed out
and took the various zero/inf/nan/subnormal cases from there. But I don't
filter them out of the tests. Instead I explicitly add them and print them out
as +/-ZERO, +/-INF, NAN and SUBNORMAL. To do this correctly I had to split the
tests into ones that work on floats (ending in S) and those that work on
doubles (ending in D).

There is a little bit of duplication because you have to indicate whether the
instruction works on floats or doubles both when generating and when calling
the testcase (someone with stronger preprocessor foo might be able to "fix"
that).

Although the testcase tries to generate positive and negative NAN values the
test does not check for that (I don't believe NANs can be positive/negative).
If we would test for that the testcase would fail since we sometimes generate a
different representation for NAN that is positive/negative according to
signbit().

The testcase does produce and test for positive/negative SUBNORMALs, I am not
100% sure that makes sense. It doesn't impact the result though.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to