Skip to content

Padding of enums required to avoid LLVM assert #4717

@nikomatsakis

Description

@nikomatsakis

For some reason, when changing the size of the expr_ enum in libsyntax, we triggered an LLVM assertion that the size must be a multiple of 64 bytes.

Some discussion of possible causes from IRC:

[16:30:46] <@pcwalton> possibly an LLVM optimizer pass is turning a packed struct into a large i1234567 and causing the asm printer to blow up
[16:30:56] <@pcwalton> I would think selection DAG would legalize it away but maybe not
[16:33:32] <echristo> pcwalton: it could be sroa as well.
[16:33:42] <@pcwalton> yeah
[16:34:01] <echristo> (which has been rewritten somewhat recently and so might be worth moving forward if you aren't there. if you are it might be worth tracking down)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions