Skip to content

Arm CSSC not supported in target_version/target_clones #131218

@tavianator

Description

@tavianator

Compiling this file

__attribute__((target_clones("cssc", "default")))
int foo(int x) {
    return __builtin_popcount(x);
}

with clang --rtlib=compiler-rt warns that

<source>:1:31: warning: unsupported 'cssc' in the 'target_clones' attribute string; 'target_clones' attribute ignored [-Wignored-attributes]
    1 | __attribute__((target_clones("cssc", "default")))
      |                               ^
<source>:1:31: warning: version list contains entries that don't impact code generation [-Wfunction-multiversion]

However, Clang does understand -march=armv8.7-a+cssc, so it knows about the extension. Is there a different spelling for the target_clones attribute value?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions