-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
compiler:codegenGeneration of LLVM IR and native codeGeneration of LLVM IR and native coderegression 1.11Regression in the 1.11 releaseRegression in the 1.11 release
Description
I'm not sure if this is expected behaviour, but I couldn't find any information about expected alignment in Julia.
Code to reproduce:
julia> using SIMD
julia> s = b"AAAAAAAAAAAAAABBBBBCBCBBBBBBBBCDE";
julia> foo(s) = GC.@preserve s unsafe_load(Ptr{Vec{32, UInt8}}(pointer(s)));
julia> foo(s)
[122821] signal 11 (128): Segmentation fault
I believe this may be a Julia bug, because SIMD doesn't add methods to unsafe_load
.
Edit: Looks like the generated code changed between 1.10 and 1.11. In 1.11, it emits a vmovaps
, which requires the pointer to be 16-byte aligned, which strings aren't always, whereas in 1.10, it emitted vmovups
instead.
This is on Julia 1.11.1 and SIMD 3.6.0
Metadata
Metadata
Assignees
Labels
compiler:codegenGeneration of LLVM IR and native codeGeneration of LLVM IR and native coderegression 1.11Regression in the 1.11 releaseRegression in the 1.11 release