[Bug 288] New: strange nonsensical x86-64 code generation with -O3 - rats' nest of useless conditional jumps

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Thu Mar 22 18:07:45 UTC 2018


https://bugzilla.gdcproject.org/show_bug.cgi?id=288

            Bug ID: 288
           Summary: strange nonsensical x86-64 code generation with -O3 -
                    rats' nest of useless conditional jumps
           Product: GDC
           Version: 7.x
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: gdc
          Assignee: ibuclaw at gdcproject.org
          Reporter: cecil at cecilward.com

Created attachment 93
  --> https://bugzilla.gdcproject.org/attachment.cgi?id=93&action=edit
D source; debug-only c9de is the weird stuff so compiling with -fdebug is
essential because the source code in question is inside a D 'debug' cond so
otherwise no relevant code will be generated

This seems to be a quirk in the code generated by the GCC x86-64 backend itself
in my humble opinion, and very much doubt it has much to do with GDC itself. I
am not alleging that the generated code does not perform the correct function,
I haven't gone through it carefully enough, but the x64 code generated is just
very strange and utterly pointless.

I compiled with GDC 7.x for x64 with
    -O3 -fdebug -march=skylake 

See the long list of useless conditional jumps towards the end of the first
function in the asm output (whose demangled name is test.t1(unit))

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the D.gnu mailing list