[llvm] [MergeFunc] Handle ConstantRange attributes. (PR #88584)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 17:29:25 PDT 2024


================
@@ -143,6 +143,14 @@ int FunctionComparator::cmpAttrs(const AttributeList L,
         if (int Res = cmpNumbers((uint64_t)TyL, (uint64_t)TyR))
           return Res;
         continue;
+      } else if (LA.isConstantRangeAttribute() &&
+                 RA.isConstantRangeAttribute()) {
----------------
nikic wrote:

This still needs the getKindAsEnum check (in case there are more ConstantRange attributes in the future).

Might make sense to just move that check outside the isTypeAttribute branch and always perform it.

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


More information about the llvm-commits mailing list