-
Notifications
You must be signed in to change notification settings - Fork 146
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
Invalid C generation #217
Comments
I think llvm-cbe does not support vector type ( If you are using Rust, disable vectorization is a not perfect solution, but it likely help. |
I'm not sure this is a vector type. I think these are the instructions: %"algo::U32X4" = type { [4 x i32] }
...
%a_vec = alloca %"algo::U32X4", align 4
...
%41 = getelementptr inbounds [4 x i32], ptr %a_vec, i64 0, i64 1, !dbg !554
%_79 = load i32, ptr %41, align 4, !dbg !554, !noundef !34 Accoding to the manual, these are arrays. Vector types have That being said, the function seems to contain vector types. Maybe that's what it confuses it? And yes, this is Rust, but neither no-vectorize-loops nor no-vectorize-slp seem to change anything, probably because this is unoptimized code, and those opts never ran. |
There are some issues people have observed with GEP emission (getting the type wrong and/or forgetting casts) which seems like what you are seeing. PRs welcome |
I was playing with llvm-cbe, and with this input file transformed with llvm-cbe, I get the following first error:
And without #lines:
The line in cause:
And the struct:
I tried miniming the input as much as I could, but I don't know how I'd do it more.
The text was updated successfully, but these errors were encountered: