[llvm] [ConstantFold][RFC] Refactor getBinOpAbsorber function (PR #109736)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 19:12:15 PDT 2024


================
@@ -1210,8 +1210,11 @@ class ConstantExpr : public Constant {
   /// Return the absorbing element for the given binary
   /// operation, i.e. a constant C such that X op C = C and C op X = C for
   /// every X.  For example, this returns zero for integer multiplication.
-  /// It returns null if the operator doesn't have an absorbing element.
-  static Constant *getBinOpAbsorber(unsigned Opcode, Type *Ty);
+  /// If AllowLHSConstant is true, operand 1 is a constant C that must be
----------------
eric-xtang1008 wrote:

Okay.

https://github.com/llvm/llvm-project/pull/109736


More information about the llvm-commits mailing list