Skip to content

Clang incorrectly disallows SVE builtins & types when SVE is disabled but SME is enabled #87129

Closed
@aemerson

Description

@aemerson

Issue is what it says on the tin. One example is svdup_u8

There are two parts to this as far as I can see. In Sema.cpp there's some diagnostics that check if "sve" is enabled for the target before sizeless types are used. This one is easy to fix.

The worse one is the fact that SInst which is the parent of every SVE instruction defines TargetGuard = "sve"; and we have to manually override it every time something diverges. I'm not sure which is the best way to fix this. We could have the default be "sve|sme" and the make sure that every override takes into consideration whether or not SME should be in the list of valid prerequisites. This seems like less work than having to change it for every instruction definition.

Metadata

Metadata

Assignees

Labels

SVEARM Scalable Vector Extensionsbackend:AArch64clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions