Here we introduce intrinsic fast math sub flag mapping, fma and interior expression fast math sub flag mapping as well as cmp and others with tests to exemplify where flags propagate and where they do not.
I'm still nervous about doing more than 1 thing in the same patch. I'd like to focus on the SelectionDAGBuilder part first. We should have tests now that verify at least some of those diffs. Can you split that change off?
I don't like that we're going to miss FMF propagation for all of these intrinsics. I'd like to get propagation done in one place and completely, so we don't have to keep adding code every time there's a new intrinsic. See D37686 for an alternate idea.