[PATCH] D125600: [SelectionDAGBuilder] Pass fast math flags to most of VP SDNodes.
Yeting Kuo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 15 19:24:43 PDT 2022
fakepaper56 marked an inline comment as done.
fakepaper56 added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7615
+ } else {
+ Result = DAG.getNode(Opcode, DL, VTs, OpValues);
+ }
----------------
craig.topper wrote:
> Why can't we do?
>
> ```
> SDValue Result;
> SDNodeFlags SDFlags;
> if (auto *FPMO = dyn_cast<FPMathOperator>(&VPIntrin))
> SDFlags.copyFMF(*FPMO);
> Result = DAG.getNode(Opcode, DL, VTs, OpValues, SDFlags);
> ```
getNode with SDVTList does not use SDNodeFlags directly.
```
SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList,
ArrayRef<SDValue> Ops, const SDNodeFlags Flags) {
if (VTList.NumVTs == 1)
return getNode(Opcode, DL, VTList.VTs[0], Ops);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125600/new/
https://reviews.llvm.org/D125600
More information about the llvm-commits
mailing list