llvm-project
a84ee141 - [compiler-rt][ARM] Enable strict mode in divsf3/mulsf3 tests (#179918)

Commit
15 hours ago
[compiler-rt][ARM] Enable strict mode in divsf3/mulsf3 tests (#179918) Commit 5efce7392f3f6cc added optimized AArch32 assembly versions of mulsf3 and divsf3, with more thorough tests. The new tests included test cases specific to Arm's particular NaN handling rules, which are disabled on most platforms, but were intended to be enabled for Arm. Unfortunately, they were not enabled under any circumstances, because I made a mistake in `test/builtins/CMakeLists.txt`: the command-line `-D` option that should have enabled them was added to the cflags list too early, before the list was reinitialized from scratch. So it never ended up on the command line. Also, the test file mulsf3.S only even _tried_ to enable strict mode in Thumb1, even though the Arm/Thumb2 implementation would also have met its requirements. Because the strict-mode tests weren't enabled, I didn't notice that they would also have failed absolutely everything, because they checked the results using the wrong sense of comparison! I used `==`, but that comparison was supposed to be a drop-in replacement for `compareResultF`, which returns zero for equality. Changed the tests to use `!=`. Finally, I've also added a macro to each test so that it records the source line number of each failing test case. That way, when a test fails, you can find it in the test source more easily, without having to search for the hex numbers mentioned in the failure message.
Author
Parents
Loading