Commit 9d94e54
committed
[NFC][InstSimplify] Refactor fminmax-folds.ll test
Refactor all the tests in fminmax-folds.ll so that they are
grouped by optimization, rather than by intrinsic.
Instead of calling 1 intrinsic per function, each function now
tests all 6 variants of the intrinsic. Results are stored to named
pointers to maintain readability in this more compact form. This
makes it much easier to compare the outputs from each intrinsic,
rather than having them scattered in different functions in different
parts of the file. It is also much more compact, so despite adding
>50% more tests, the file is ~500 lines shorter.
The tests added include:
* Adding maximumnum and minimumnum everywhere (currently not optimized,
but added as a baseline for future optimizations in llvm#139581).
* Adding separate tests for SNaN and QNaN (as a baseline for
correctness improvements in llvm#139581)
* Adding tests for scalable vectors
* Increasing the variety of types used in various tests by using
more f16, f64, and vector types in tests.
The only coverage removed is for tests with undef (only poison is now
tested for).
Overall, this refactor should increase coverage, improve readability
with more comments and clear section headers, and make the tests
much more compact and easier to review in llvm#139581 by providing a
clear baseline for each intrinsic's current behaviour.1 parent 18630b0 commit 9d94e54
1 file changed
+850
-1384
lines changed
0 commit comments