[llvm-bugs] [Bug 41111] New: Different code generation [csmith generated code]

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 17 03:49:52 PDT 2019


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: unassignedbugs at nondot.org
          Reporter: praveenvelliengiri at gmail.com
                CC: jdevlieghere at apple.com, keith.walker at arm.com,
                    llvm-bugs at lists.llvm.org,
                    paul_robinson at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190317/3ca1bcd7/attachment.html>


More information about the llvm-bugs mailing list