diff --git a/src/eval/eval_ir.c b/src/eval/eval_ir.c index 8c8db833..7beb8014 100644 --- a/src/eval/eval_ir.c +++ b/src/eval/eval_ir.c @@ -228,19 +228,8 @@ e_irtree_mem_read_type(Arena *arena, E_IRNode *c, E_TypeKey type_key) read_node->value.u64 = byte_size; e_irnode_push_child(read_node, c); - // rjf: build a signed trunc node if needed - U64 bit_size = byte_size << 3; - E_IRNode *with_trunc = read_node; - E_TypeKind kind = e_type_kind_from_key(type_key); - if(bit_size < 64 && e_type_kind_is_signed(kind)) - { - with_trunc = e_push_irnode(arena, RDI_EvalOp_TruncSigned); - with_trunc->value.u64 = bit_size; - e_irnode_push_child(with_trunc, read_node); - } - // rjf: fill - result = with_trunc; + result = read_node; return result; } @@ -898,10 +887,6 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I { new_tree = e_irtree_trunc(arena, in_tree, cast_type); } - if(e_type_kind_is_signed(cast_type_unwrapped_kind) && e_type_kind_is_integer(casted_type_unwrapped_kind) && !e_type_kind_is_signed(casted_type_unwrapped_kind)) - { - new_tree = e_irtree_trunc(arena, in_tree, cast_type); - } result.root = new_tree; result.type_key = cast_type; result.mode = E_Mode_Value; diff --git a/src/mule/mule_main.cpp b/src/mule/mule_main.cpp index 64a47e14..1c81f570 100644 --- a/src/mule/mule_main.cpp +++ b/src/mule/mule_main.cpp @@ -413,6 +413,9 @@ type_coverage_eval_tests(void) uint32_t a = (1<<31); int32_t b = (1<<31); + uint32_t abcd = 0xaabbccdd; + int64_t abcd64 = (int64_t)abcd; + char string[] = "Hello World!"; char longer_text[] = "Suppose there was some text\n"