Skip to content

[X86] is_ascii optimizes poorly with avx-512 #176906

@folkertdev

Description

@folkertdev

https://godbolt.org/z/6EzTa5crM (edit, reduced further to https://godbolt.org/z/68d8es9Tv)

It looks like a LoopFullUnrollPass that is never re-rolled (or should not be unrolled in the first place). The unrolled operations are eventually emitted as

        kshiftrd        k7, k6, 12
        add     r10b, r9b
        and     dl, 1
        kmovd   r9d, k7

but this is probably just a symptom of an earlier missed optimization. The idea of is_ascii is to build a mask of which bytes set their highest bit, so I guess some avx-512 pattern for that is missing.

cc rust-lang/rust#151259

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions