[flang-commits] [clang] [flang] [mlir] [Flang][Driver]Implemented the support for option -f[no-]optimize-sibling-calls in Flang (PR #216650)

Kaviya Rajendiran via flang-commits flang-commits at lists.llvm.org
Fri Aug 28 02:00:34 PDT 2026


================
@@ -0,0 +1,15 @@
+// RUN: fir-opt --function-attr="disable-tail-calls=true" %s | FileCheck %s --check-prefix=ENABLED
+// RUN: fir-opt --function-attr="disable-tail-calls=false" %s | FileCheck %s --check-prefix=DISABLED
+
+func.func @_QPf() {
+  return
+}
+
+// ENABLED: func.func @_QPf() attributes {llvm.disable_tail_calls = true} {
+// ENABLED-NEXT:   return
+// ENABLED-NEXT: }
----------------
kaviya2510 wrote:

The body checks aren't needed for the test to be valid. I included them mainly for readability. Happy to drop them if you prefer a narrower check.

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


More information about the flang-commits mailing list