fixed bug

This commit is contained in:
Philippe Tillet
2019-07-05 15:07:20 -07:00
parent 88ebdddf3d
commit c666f71fd6
3 changed files with 31 additions and 32 deletions

View File

@@ -53,8 +53,6 @@ void node::implicit_cast(ir::builder &builder, ir::value *&lhs, ir::value *&rhs,
ir::type *right_ty = rhs->get_type()->get_scalar_ty();
// One operand is pointer
if(left_ty->is_pointer_ty() || right_ty->is_pointer_ty()){
if(right_ty->is_pointer_ty())
std::swap(lhs, rhs);
is_ptr = true;
}
// One operand is double