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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to