这是indexloc提供的服务,不要输入任何密码
Skip to content

Sub-optimal codegen for types containing float+ZST #38269

@iliekturtles

Description

@iliekturtles

Similar to #32031 a struct P<D> { value: f32, PhantomData<D>, } is mapped to i32 instead of f32 in the resulting llvm-ir output. Based on IRC discussions with @rkruppe the issue is likely caused by the inclusion of any zero-sized types in the struct.

A minimal example is available at https://github.com/iliekturtles/llvm-opt/tree/fa05ddb4fb869e492e04c93e04fa0e939fb2fb49 and includes the offending llvm-ir and asm output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions