[PATCH] D104723: [DAGCombine] Check reassoc flags in aggressive fsub fusion
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 22 10:13:52 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13255-13260
+ bool CanReassociate =
+ Options.UnsafeFPMath || N->getFlags().hasAllowReassociation();
+
+ auto isReassociatable = [Options](SDValue N) {
+ return Options.UnsafeFPMath || N->getFlags().hasAllowReassociation();
+ };
----------------
jsji wrote:
> lebedev.ri wrote:
> >
> ```
> llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13258:25: error: no matching function for call to object of type '(lambda at llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13255:25)'
> bool CanReassociate = isReassociable(N);
> ^~~~~~~~~~~~~~
> llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13255:25: note: candidate function not viable: no known conversion from 'llvm::SDNode *' to 'llvm::SDValue' for 1st argument
> auto isReassociable = [Options](SDValue N) {
> ^
> 1 error generated.
> ninja: build stopped: subcommand failed.
> ```
>
> N is SDNode, any suggestion to get SDValue of it? SDValue() might cause crash in tests.
`SDValue(N, 0)`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104723/new/
https://reviews.llvm.org/D104723
More information about the llvm-commits
mailing list