[PATCH] D91962: Add support for STRICT_FSETCC promotion
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 10:23:54 PST 2020
uweigand requested changes to this revision.
uweigand added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:4617
+ case ISD::STRICT_FSETCC: {
unsigned ExtOp = ISD::FP_EXTEND;
if (NVT.isInteger()) {
----------------
When expanding a strict FP operation, we need to take care to never emit any non-strict operation. It looks like the patch as currently written might cause a "FP_EXTEND" to be emitted, which would violate that rule.
We need to emit a STRICT_FP_EXTEND instead (which needs to be properly chained just before the new STRICT_FSETCC node). Then everything should be OK since the only case where STRICT_FP_EXTEND might raise an exception is if the input is a (signaling) NaN, in which case the original STRICT_FSETCC would also have raised an exception.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91962/new/
https://reviews.llvm.org/D91962
More information about the llvm-commits
mailing list