Using the nonans FMF and the DAG.isKnownNeverNaN on the inputs.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM.
| llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
|---|---|---|
| 4659 | How about to initialize NewY as Y and assign it to select node if Op->getFlags().hasNoNaNs() || DAG.isKnownNeverNaN(X) like, SDValue NewY = Y;
if (Op->getFlags().hasNoNaNs() || DAG.isKnownNeverNaN(X)) {
    SDValue XIsNonNan = DAG.getSetCC(DL, XLenVT, X, X, ISD::SETOEQ);
    NewY = DAG.getSelect(DL, VT, XIsNonNan, Y, X); 
} | |
clang-format not found in user’s local PATH; not linting file.