Skip to content

Commit 7dfd093

Browse files
JeffBezansonbirm
authored andcommitted
fix JuliaLang#34826, unwrap VecElement when needed in julia_const_to_llvm (JuliaLang#34829)
1 parent ba9e2a2 commit 7dfd093

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/intrinsics.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ static Constant *julia_const_to_llvm(const void *ptr, jl_datatype_t *bt)
158158

159159
Type *lt = julia_struct_to_llvm((jl_value_t*)bt, NULL, NULL);
160160

161+
if (jl_is_vecelement_type((jl_value_t*)bt) && !jl_is_uniontype(jl_tparam0(bt)))
162+
bt = (jl_datatype_t*)jl_tparam0(bt);
163+
161164
if (type_is_ghost(lt))
162165
return UndefValue::get(lt);
163166

0 commit comments

Comments
 (0)