Since recently, codegen always passes constants of vector type as immediates in LLVM (#128537). This gives us a change to clean up this hack, where the idx argument of simd_shuffle is forced to be passed as an immediate. However, simd_shuffle for some reason actually takes an array as argument, not a vector, so the hack is still required to ensure that the array becomes an immediate (which then later stages of codegen convert into a vector, as that's what LLVM needs).
This is more painful than it should be because stdarch is a submodule 😢 , so we'll have to do it in stages:
Since recently, codegen always passes constants of vector type as immediates in LLVM (#128537). This gives us a change to clean up this hack, where the
idxargument ofsimd_shuffleis forced to be passed as an immediate. However, simd_shuffle for some reason actually takes an array as argument, not a vector, so the hack is still required to ensure that the array becomes an immediate (which then later stages of codegen convert into a vector, as that's what LLVM needs).This is more painful than it should be because stdarch is a submodule 😢 , so we'll have to do it in stages: