================
@@ -10,3 +10,19 @@
 
 ! RUN: %flang -fno-omit-frame-pointer --target=x86-none-none -fsyntax-only 
-### %s -o %t 2>&1  | FileCheck %s --check-prefix=CHECK-ALLFP
 ! CHECK-ALLFP: "-fc1"{{.*}}"-mframe-pointer=all"
+
+! RUN: %flang -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer 
--target=aarch64-none-none -fsyntax-only -### %s -o %t 2>&1  | FileCheck %s 
--check-prefix=CHECK-FRAME-POINTER-ALL
+! CHECK-FRAME-POINTER-ALL: "-fc1"{{.*}}"-mframe-pointer=all"
+
+! RUN: %flang -fno-omit-frame-pointer -momit-leaf-frame-pointer 
--target=x86_64-unknown-linux-gnu -fsyntax-only -### %s -o %t 2>&1  | FileCheck 
%s --check-prefix=CHECK-X86-NONLEAF
+! CHECK-X86-NONLEAF: "-fc1"{{.*}}"-mframe-pointer=non-leaf-no-reserve"
+
+! RUN: %flang -fno-omit-frame-pointer -momit-leaf-frame-pointer 
-mno-omit-leaf-frame-pointer --target=x86_64-unknown-linux-gnu -fsyntax-only 
-### %s -o %t 2>&1  | FileCheck %s --check-prefix=CHECK-LAST-WINS
+! CHECK-LAST-WINS: "-fc1"{{.*}}"-mframe-pointer=all"
+
+! Without -fno-omit-frame-pointer the leaf option is silently allowed but has 
no effect, matching Clang's behavior.
+! RUN: %flang -momit-leaf-frame-pointer --target=x86_64-unknown-linux-gnu -O2 
-fsyntax-only -### %s -o %t 2>&1  | FileCheck %s --check-prefix=CHECK-LEAF-ONLY
----------------
kaviya2510 wrote:

Yes its needed. Other than `-O0`, the behaviour of options change for 
`-O1/-O2/-O3`

https://github.com/llvm/llvm-project/pull/216700
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to