[PATCH] D28332: DAGCombiner: Add hasOneUse checks to fadd/fma combine

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 15:46:04 PST 2017


RKSimon accepted this revision.
RKSimon added a reviewer: RKSimon.
RKSimon added a comment.
This revision is now accepted and ready to land.

Agreed, LGTM



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8141
+        N0->hasOneUse() &&
+        N0.getOperand(2)->hasOneUse()) {
       return DAG.getNode(PreferredFusedOpcode, SL, VT,
----------------
clang-format - reduce lines


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8154
+        N1->hasOneUse() &&
+        N1.getOperand(2)->hasOneUse()) {
       return DAG.getNode(PreferredFusedOpcode, SL, VT,
----------------
clang-format - reduce lines


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8388
+        N0->hasOneUse() &&
+        N0.getOperand(2)->hasOneUse()) {
       return DAG.getNode(PreferredFusedOpcode, SL, VT,
----------------
clang-format - reduce lines


https://reviews.llvm.org/D28332





More information about the llvm-commits mailing list