Skip to content

[Attributor] Loop-aware attribute handling? (alignment) #43949

Open
@LebedevRI

Description

@LebedevRI
Bugzilla Link 44604
Version trunk
OS Linux
CC @jdoerfert,@jdoerfert,@Ralender,@uenoku

Extended Description

Given

// Type your code here, or load an example.
void test(int* dst, int count) {
    dst = (int*)__builtin_assume_aligned(dst, 1024);
    for(int i = 0; i != count; ++i) 
        dst[i] = 42;
}

normal clang -O3 -fno-unroll-loops does result in propagating of alignment
to store. But attributor fails to do that.

https://godbolt.org/z/dncWmz

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