craig.topper added a comment. I don't think that's right for the fastmath flags. In your example case the returned instruction is a select. That's not the instruction that should be getting the fastmath flags. I'm suprised that doesn't assert. https://reviews.llvm.org/D37019