Skip to content

Loop vectorizer missed opt remarks are sometimes uninformatively terse #158499

@TiborGY

Description

@TiborGY

When a loop cannot be vectorized by the loop vectorizer for some reason, it should leave an informative message in the optimization remarks log.
But quite often this is not the case and only a "loop not vectorized" message is given as a missed-optimization remark.
See https://godbolt.org/z/41Yxvcsn9

I believe the cause is that these messages are emitted by LoopVectorizeHints::emitRemarkWithHints()

void LoopVectorizeHints::emitRemarkWithHints() const {

This is called from multiple locations in LoopVectorize.cpp, therefore multiple causes of vectorization failure collapse into the non-specific "loop not vectorized" message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions