[llvm] [Analysis] Attribute Range should not prevent tail call optimization (PR #91122)

Jinsong Ji via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 07:28:35 PDT 2024


================
@@ -593,9 +593,10 @@ bool llvm::attributesPermitTailCall(const Function *F, const Instruction *I,
 
   // Following attributes are completely benign as far as calling convention
   // goes, they shouldn't affect whether the call is a tail call.
-  for (const auto &Attr : {Attribute::Alignment, Attribute::Dereferenceable,
-                           Attribute::DereferenceableOrNull, Attribute::NoAlias,
-                           Attribute::NonNull, Attribute::NoUndef}) {
+  for (const auto &Attr :
+       {Attribute::Alignment, Attribute::Dereferenceable,
+        Attribute::DereferenceableOrNull, Attribute::NoAlias,
+        Attribute::NonNull, Attribute::NoUndef, Attribute::Range}) {
----------------
jsji wrote:

Thanks @arsenm and @nikic . https://github.com/llvm/llvm-project/issues/91218 opened to track the follow up. 

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


More information about the llvm-commits mailing list