[llvm] [ObjCARC] Add variations of intrinsics that do not touch reference counts (PR #94919)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 11:04:39 PDT 2024


================
@@ -4241,9 +4241,20 @@ SelectionDAG::computeOverflowForSignedAdd(SDValue N0, SDValue N1) const {
   // cannot overflow.
   if (ComputeNumSignBits(N0) > 1 && ComputeNumSignBits(N1) > 1)
     return OFK_Never;
+  
+    // smulhi + any value never overflow
+  KnownBits N1Known = computeKnownBits(N1);
+  if (N0.getOpcode() == ISD::SMUL_LOHI)
+    return OFK_Never;
----------------
arsenm wrote:

Unrelated change 

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


More information about the llvm-commits mailing list