Skip to content

Different code generation [csmith generated code] #​1 #40456

@llvmbot

Description

@llvmbot
Bugzilla Link 41111
Version trunk
OS Linux
Blocks #37076
Attachments Random code, with di attached, without di
Reporter LLVM Bugzilla Contributor
CC @efriedma-quic,@gregbedwell,@JDevlieghere,@walkerkd,@pogo59

Extended Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions