[PATCH] D104723: [DAGCombine] Check reassoc flags in aggressive fsub fusion

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 10:04:50 PDT 2021


jsji 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();
+  };
----------------
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.


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