[PATCH] D119654: [SDAG] enable binop identity constant folds for add/sub

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 02:27:59 PST 2022


xbolva00 added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2148
+      }
+    }
     return false;
----------------
You can use Constantexpr::getBinOpIdentity to check if identity constant.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119654/new/

https://reviews.llvm.org/D119654



More information about the llvm-commits mailing list