https://bugs.llvm.org/show_bug.cgi?id=41111

            Bug ID: 41111
           Summary: Different code generation [csmith generated code]
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedb...@nondot.org
          Reporter: praveenvellieng...@gmail.com
                CC: jdevliegh...@apple.com, keith.wal...@arm.com,
                    llvm-bugs@lists.llvm.org,
                    paul_robin...@playstation.sony.com

Created attachment 21620
  --> https://bugs.llvm.org/attachment.cgi?id=21620&action=edit
Random code

Hi

The source file attached produce different codegen behaviour for X86_64 at
optimization levels -O2, -O3, -Os with -g enabled and disabled. 

Interesting note here is that disassembly of code at one -opt level vary a lot
from code generated at different -opt level.

I have attached the source file, code generated at -O2 with/without -g option.

Steps to reproduced in X86_64 linux.

clang++ -c -g -O2 -Wno-everything -I/headers/of/csmith source.cpp -o di

clang++ -c -O2 -Wno-everything -I/headers/of/csmith source.cpp -o nodi

objdump -d -j .text nodi > hide1
objdump -d -j .text di   > hide2

colordiff hide1 hide2 || diff hide1 hide2

As these are randomly generated, the reducing to these to minimum test case is
quite difficult. I'm working on that.

Anyone have thoughts on it? Please reply 
Thanks

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to