[LLVMbugs] [Bug 4945] New: clang: -fomit-frame-pointer must be enabled at -O1 and higher on x86-64

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Sep 10 13:21:20 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=4945

           Summary: clang: -fomit-frame-pointer must be enabled at -O1 and
                    higher on x86-64
           Product: new-bugs
           Version: 2.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


llvm-gcc and gcc enable -fomit-frame-pointer at -O1 and higher (including -Os)
on x86-64; clang does not.

Testcase:
$ echo 'int main(){return 0;}'|~/llvm-git/install/bin/clang -march=x86-64 -O1
-x c - -S -o -|grep rbp
        pushq   %rbp
        movq    %rsp, %rbp
        popq    %rbp

$ echo 'int main(){return 0;}'|~/llvm-git/install/bin/llvm-gcc -march=x86-64
-O1 -x c - -S -o -|grep rbp

Note that this is a driver issue, if I use -fomit-frame-pointer clang works
correctly too:
$ echo 'int main(){return 0;}'|~/llvm-git/install/bin/clang -march=x86-64
-fomit-frame-pointer -O1 -x c - -S -o -|grep rbp


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list