aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorVenkataramanan Kumar <venkataramanan.kumar.llvm@gmail.com>2020-09-02 08:23:48 -0400
committerSanjay Patel <spatel@rotateright.com>2020-09-02 08:23:48 -0400
commit626c3738cdfa49527097fccdf89e22949138ade7 (patch)
treed47c9daf26ffb6e0fb3037c4a14e1216ea8c627c /clang/lib/Frontend/CompilerInvocation.cpp
parent8fb055932c085da21f3b721995a06f42006744bd (diff)
downloadllvm-626c3738cdfa49527097fccdf89e22949138ade7.zip
llvm-626c3738cdfa49527097fccdf89e22949138ade7.tar.gz
llvm-626c3738cdfa49527097fccdf89e22949138ade7.tar.bz2
[InstCombine] Transform 1.0/sqrt(X) * X to X/sqrt(X)
These transforms will now be performed irrespective of the number of uses for the expression "1.0/sqrt(X)": 1.0/sqrt(X) * X => X/sqrt(X) X * 1.0/sqrt(X) => X/sqrt(X) We already handle more general cases, and we are intentionally not creating extra (and likely expensive) fdiv ops in IR. This pattern is the exception to the rule because we always expect the Backend to reduce X/sqrt(X) to sqrt(X), if it has the necessary (reassoc) fast-math-flags. Ref: DagCombiner optimizes the X/sqrt(X) to sqrt(X). Differential Revision: https://reviews.llvm.org/D86726
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions