[PATCH] D80974: [DAGCombine] Adding a hook to improve the precision of fsqrt if the input is denormal
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 20:16:38 PST 2020
shchenz accepted this revision.
shchenz added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:21981
+ Test.getValueType().isVector() ? ISD::VSELECT : ISD::SELECT, DL, VT,
+ Test, TLI.getSqrtResultForDenormInput(Op, DAG), Est);
}
----------------
On Powerpc target, we use 0.0 as denormal float point sqrt result for a long time. Changing the result to hardware sqrt instructions will improve the precision for sure, but it also degrades the runtime performance. Is it possible to do it like: if we concern about performance, we use 0.0, if we concern about precision, we use hardware sqrt instruction. Maybe `-Ofast` is an indicatation for this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80974/new/
https://reviews.llvm.org/D80974
More information about the llvm-commits
mailing list