[PATCH] D80717: DAG: Fix getNode dropping flags if there's a glue output
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 06:30:23 PDT 2020
arsenm created this revision.
arsenm added reviewers: craig.topper, bogner, uweigand, cameron.mcinally.
Herald added subscribers: hiraditya, tpr, wdng.
Herald added a project: LLVM.
arsenm added a child revision: D80719: AMDGPU: Fix not emitting nofpexcept on fdiv expansion.
The AMDGPU non-strict fdiv lowering needs to introduce an FP mode
switch in some cases, and has custom nodes to provide chain/glue for
the intermediate FP operations. We need to propagate nofpexcept here,
but getNode was dropping the flags.
Adding nofpexcept in the AMDGPU custom lowering is left to a future
patch.
Also fix a second case where flags were dropped, but in this case it
seems it just didn't handle this number of operands.
Test will be included in future AMDGPU patch.
https://reviews.llvm.org/D80717
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -7425,6 +7425,7 @@
createOperands(N, Ops);
}
+ N->setFlags(Flags);
InsertNode(N);
SDValue V(N, 0);
NewSDValueDbgMsg(V, "Creating new node: ", this);
@@ -7506,13 +7507,14 @@
return SDValue(E, 0);
N = newSDNode<SDNode>(Opcode, DL.getIROrder(), DL.getDebugLoc(), VTList);
- N->setFlags(Flags);
createOperands(N, Ops);
CSEMap.InsertNode(N, IP);
} else {
N = newSDNode<SDNode>(Opcode, DL.getIROrder(), DL.getDebugLoc(), VTList);
createOperands(N, Ops);
}
+
+ N->setFlags(Flags);
InsertNode(N);
SDValue V(N, 0);
NewSDValueDbgMsg(V, "Creating new node: ", this);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80717.266830.patch
Type: text/x-patch
Size: 856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200528/9285e5b2/attachment.bin>
More information about the llvm-commits
mailing list