After https://reviews.llvm.org/D62414 "[InstCombine] canonicalize fcmp+select to minnum/maxnum intrinsics", the test-suite no longer builds on earlier subtargets. This was commented on here: https://github.com/llvm/llvm-project/commit/ebf9bf2cbc8fa68d536e481e370c4ba40ce61a8a.
This is an attempt to fix this by guarding this transformation with a query to TTI so that if this would result in a libcall, it is skipped.
I was expecting InstCombine to use TargetTransforminfo, but found that I had to add the TTI member. Is there a reason it should not be used?
With this patch the test-suite now builds again on z10...