[PATCH] D70488: [InstCombine] Infer fast math flags on fadd/fsub/fmul/fcmp

2019-11-21 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment. In D70488#1753897 , @mcberg2017 wrote: > For us this would be an impediment as we have math models that want ieee > behavior while relaxing precision. Adding nnan or ninf would obstruct those > choices. Mind elaborating why nn

[PATCH] D70488: [InstCombine] Infer fast math flags on fadd/fsub/fmul/fcmp

2019-11-20 Thread Michael Berg via Phabricator via cfe-commits
mcberg2017 added a comment. For us this would be an impediment as we have math models that want ieee behavior while relaxing precision. Adding nnan or ninf would obstruct those choices. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70488/new/ ht

[PATCH] D70488: [InstCombine] Infer fast math flags on fadd/fsub/fmul/fcmp

2019-11-20 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added reviewers: cameron.mcinally, mcberg2017, arsenm. spatel added a comment. Herald added a subscriber: wdng. I like the idea, but I'd be more comfortable reviewing the diffs in stages, so we know that the test coverage for the value tracking calls is good. So I'd prefer if we split thi

[PATCH] D70488: [InstCombine] Infer fast math flags on fadd/fsub/fmul/fcmp

2019-11-20 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer updated this revision to Diff 230245. bkramer added a comment. Fix condition Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70488/new/ https://reviews.llvm.org/D70488 Files: clang/test/CodeGen/builtins-systemz-zvector.c llvm/lib/Transfo

[PATCH] D70488: [InstCombine] Infer fast math flags on fadd/fsub/fmul/fcmp

2019-11-20 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer created this revision. bkramer added a reviewer: spatel. Herald added subscribers: cfe-commits, hiraditya. Herald added projects: clang, LLVM. Applies nnan, ninf and nsz. This allows more instructions to be folded away even with no fast math flags, e.g. (int)x * (b ? 1.0 : 0.0) -> b ? x :