[PATCH] D125600: [SelectionDAGBuilder] Pass fast math flags to most of VP SDNodes.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 15 19:31:07 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7615
+ } else {
+ Result = DAG.getNode(Opcode, DL, VTs, OpValues);
+ }
----------------
fakepaper56 wrote:
> 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);
> ```
Can you submit a patch to fix that? It’s a bug.
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