Skip to content

Commit

Permalink
Remove global basic integer types (#43752)
Browse files Browse the repository at this point in the history
Co-authored-by: Prem Chintalapudi <[email protected]>
  • Loading branch information
pchintalapudi and Prem Chintalapudi committed Jan 12, 2022
1 parent fd8b2ab commit f046fc8
Show file tree
Hide file tree
Showing 6 changed files with 594 additions and 586 deletions.
6 changes: 3 additions & 3 deletions src/abi_ppc64le.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ Type *preferred_llvm_type(jl_datatype_t *dt, bool isret, LLVMContext &ctx) const
int hfa = isHFA(dt, &ty0, &hva);
if (hfa <= 8) {
if (ty0 == jl_float32_type) {
return ArrayType::get(T_float32, hfa);
return ArrayType::get(llvm::Type::getFloatTy(ctx), hfa);
}
else if (ty0 == jl_float64_type) {
return ArrayType::get(T_float64, hfa);
return ArrayType::get(llvm::Type::getDoubleTy(ctx), hfa);
}
else {
jl_datatype_t *vecty = (jl_datatype_t*)jl_field_type(ty0, 0);
assert(jl_is_datatype(vecty) && vecty->name == jl_vecelement_typename);
Type *ety = bitstype_to_llvm(jl_tparam0(vecty));
Type *ety = bitstype_to_llvm(jl_tparam0(vecty), ctx);
Type *vty = FixedVectorType::get(ety, jl_datatype_nfields(ty0));
return ArrayType::get(vty, hfa);
}
Expand Down
2 changes: 1 addition & 1 deletion src/abi_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Type *preferred_llvm_type(jl_datatype_t *dt, bool isret, LLVMContext &ctx) const
return NULL;
// special case Complex{Float32} as a return type
if (is_complex64(dt))
return T_int64;
return llvm::Type::getInt64Ty(ctx);
return NULL;
}

Expand Down
Loading

0 comments on commit f046fc8

Please sign in to comment.