-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Stage2 miscompiles vector element acces via slice of vectors #11856
Comments
also ensure |
Here we can see the segfault happens on %11 = load <2 x i8>, <2 x i8>* %10, align 16, !dbg !66 Here we have told LLVM that the pointer to the second vector inside this slice is 16 bytes aligned, however that is clearly incorrect, which means undefined behavior (in our case thankfully manifesting as a segfault). Solution is to fix the LLVM IR to have a correct alignment annotation. |
One key difference between stage1 and stage2 on this right now is the result of
ff2ec0dc5a src/type.zig (Andrew Kelley 2021-04-24 17:31:52 -0700 2909) // TODO audit this - is there any more complicated logic to determine
ff2ec0dc5a src/type.zig (Andrew Kelley 2021-04-24 17:31:52 -0700 2910) // ABI alignment of vectors?
af844931b2 src/type.zig (Andrew Kelley 2022-03-26 00:33:14 -0700 2911) .vector => return AbiAlignmentAdvanced{ .scalar = 16 }, 😅 |
The text was updated successfully, but these errors were encountered: