================
@@ -5636,9 +5639,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo 
&CallInfo,
     Attrs =
         Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::AlwaysInline);
 
-  // Add call-site convergent attribute if exists.
-  if (InConvergentAttributedStmt)
-    Attrs = Attrs.addFnAttribute(getLLVMContext(), 
llvm::Attribute::Convergent);
+  // Remove call-site convergent attribute if requested.
+  if (InNoConvergentAttributedStmt)
+    Attrs =
+        Attrs.removeFnAttribute(getLLVMContext(), llvm::Attribute::Convergent);
----------------
darkbuck wrote:

> Is it easy to avoid adding this in the first place?

`getTrivialDefaultFunctionAttributes` needs an extra argument to avoid that. 
However, that helper is called in several places, and that extra info is not 
always available. Forcing a default value in those places seems unreasonable or 
incorrect.

https://github.com/llvm/llvm-project/pull/100637
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to