In SimplifySelectsFeedingBinaryOp, propagate fast math flags from the
outer op into both arms of the new select, to take advantage of
simplifications that require fast math flags.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
The code change seems fine, but the lone test does not provide enough coverage. Please have a look and rebase:
rL368028
Comment Actions
Done. Thanks for the test cases! Note that the fdiv case is not affected because InstCombiner::visitFDiv does not call SimplifySelectsFeedingBinaryOp. Perhaps it should.
Comment Actions
Yes - I noticed that test wasn't changing, but I didn't track down why. If you want to mark that test with a TODO comment, that would be good. Or you could fix the fdiv logic first, then update this patch again to show the improvement for fdiv.
LGTM