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

Created attachment 21620
Random code


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 

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to