Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to vectorize simple loops #8

Open
schwarzschild-radius opened this issue Mar 2, 2020 · 4 comments
Open

Unable to vectorize simple loops #8

schwarzschild-radius opened this issue Mar 2, 2020 · 4 comments

Comments

@schwarzschild-radius
Copy link

I am experiementing with riscv vector extension using the rvv branch. I am unable to vectorize even simple loops that I am able to vectorize in x86 (verified the results from opt-remarks).

int main(int argc, char* argv[]){
    int a[100], b[100], c[100];
    #pragma clang loop vectorize(assume_safety)
    for (int i = 0; i < 100; i++){
        c[i] = a[i] + b[i];
    }
    return c[argc];
}

Am I missing anything?

@jim-wilson
Copy link

This port is in very early stages. I think the only support that exists at present is assembling and disassembling vector instructions.
https://reviews.llvm.org/D69987
It will be a while before it has auto vectorization support.

@schwarzschild-radius
Copy link
Author

Recently, the patch was merged into llvm trunk. Is there a way to codegen to the vector-extension from LLVM-IR?

@kito-cheng
Copy link
Member

Maybe @Hsiangkai @zakk0610 or @ebahapo could update the latest status for you.

@zakk0610
Copy link

No, llvm trunk only supports assembling and disassembling for RVV 0.8.
RVV 0.9 MC is under review. https://reviews.llvm.org/D80802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants