diff options
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r-- | gcc/trans-mem.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 220ded277b5..9d5155d6c7c 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -1072,8 +1072,8 @@ tm_log_add (basic_block entry_block, tree addr, gimple stmt) if (entry_block && transaction_invariant_address_p (lp->addr, entry_block) && TYPE_SIZE_UNIT (type) != NULL - && host_integerp (TYPE_SIZE_UNIT (type), 1) - && (tree_low_cst (TYPE_SIZE_UNIT (type), 1) + && tree_fits_uhwi_p (TYPE_SIZE_UNIT (type)) + && ((HOST_WIDE_INT)(tree_to_uhwi (TYPE_SIZE_UNIT (type))) < PARAM_VALUE (PARAM_TM_MAX_AGGREGATE_SIZE)) /* We must be able to copy this type normally. I.e., no special constructors and the like. */ @@ -1156,9 +1156,9 @@ tm_log_emit_stmt (tree addr, gimple stmt) code = BUILT_IN_TM_LOG_DOUBLE; else if (type == long_double_type_node) code = BUILT_IN_TM_LOG_LDOUBLE; - else if (host_integerp (size, 1)) + else if (tree_fits_uhwi_p (size)) { - unsigned int n = tree_low_cst (size, 1); + unsigned int n = tree_to_uhwi (size); switch (n) { case 1: @@ -2074,9 +2074,9 @@ build_tm_load (location_t loc, tree lhs, tree rhs, gimple_stmt_iterator *gsi) else if (type == long_double_type_node) code = BUILT_IN_TM_LOAD_LDOUBLE; else if (TYPE_SIZE_UNIT (type) != NULL - && host_integerp (TYPE_SIZE_UNIT (type), 1)) + && tree_fits_uhwi_p (TYPE_SIZE_UNIT (type))) { - switch (tree_low_cst (TYPE_SIZE_UNIT (type), 1)) + switch (tree_to_uhwi (TYPE_SIZE_UNIT (type))) { case 1: code = BUILT_IN_TM_LOAD_1; @@ -2146,9 +2146,9 @@ build_tm_store (location_t loc, tree lhs, tree rhs, gimple_stmt_iterator *gsi) else if (type == long_double_type_node) code = BUILT_IN_TM_STORE_LDOUBLE; else if (TYPE_SIZE_UNIT (type) != NULL - && host_integerp (TYPE_SIZE_UNIT (type), 1)) + && tree_fits_uhwi_p (TYPE_SIZE_UNIT (type))) { - switch (tree_low_cst (TYPE_SIZE_UNIT (type), 1)) + switch (tree_to_uhwi (TYPE_SIZE_UNIT (type))) { case 1: code = BUILT_IN_TM_STORE_1; @@ -3087,7 +3087,7 @@ expand_block_edges (struct tm_region *const region, basic_block bb) // TM_ABORT directly get what they deserve. tree arg = gimple_call_arg (stmt, 0); if (TREE_CODE (arg) == INTEGER_CST - && (TREE_INT_CST_LOW (arg) & AR_OUTERABORT) != 0 + && (tree_to_hwi (arg) & AR_OUTERABORT) != 0 && !decl_is_tm_clone (current_function_decl)) { // Find the GTMA_IS_OUTER transaction. |