This is a continuation of https://reviews.llvm.org/D54649, which was abandoned by @cameron.mcinally
The major differences to Cameron's approach include:
- I did not actually require any TableGen changes, but was able to represent the overloaded intrinsic types using existing mechanisms. This solution looks correct to me, but if I'm missing anything here, please let me know ...
- This adds a full set of compare intrinsics for all comparison codes.
- I've added (mostly) complete SystemZ back-end support to actually generate correct code for all of them -- this is also to verify that the use of Custom expansion of strict operations actually allows the back-end to do what it needs to do.
This patch is still not complete, but I wanted to show it now to ask for feedback.
Some areas that definitely need more work are:
- Vector type legalization of invalid vector types involving STRICT_FSETCC doesn't work yet.
- Signalling comparisons are not supported yet.
- We may also need strict versions of SELECT_CC and BR_CC. I haven't implemented those yet since they aren't really necessary for SystemZ, but some other platforms may require them.
- The X86 back-end changes are incomplete, they're right now the bare minimum to keep Cameron's two test cases working.
- There are many SETCC-related transformations and optimizations in the SelectionDAG codegen. Many of these are also valid for the strict FP case. I haven't found a simple way yet to write those transformations so that can easily handle both cases without duplicating a lot of boilerplate code ... Right now the patch implements the minimum set of those to get the SystemZ test cases to work (at least generating the same code as the non-strict versions for extremely simple use cases).
These DAG.getNode changes could probably be broken out into a standalone Diff.