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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 00:10:32 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}) {
----------------
arsenm wrote:

As a follow up patch, this also should filter out nofpclass 

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


More information about the llvm-commits mailing list