Skip to content

Need comprehensive story for target_feature compat #140570

Description

@workingjubilee

From #138872 per Amanieu:

I do think we need a more general mechanism to indicate that 2 target features are mutually incompatible. For example:

  • RISC-V: Zfinx & F
  • RISC-V: I & E
  • ARM: mclass & rclass & aclass

Currently nothing stops you from enabling incompatible features with #[target_feature] and -C target-feature, which will crash LLVM.

We should be emitting an error way before anything gets to LLVM because we have to have a better idea of what features are actually compatible. We effectively need to have both global and local notions of it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions