diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-18 14:52:56 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-18 14:52:56 +0000 |
commit | aa59f000a84f3f0016bcb959a077047090c8d91c (patch) | |
tree | bc3f5ccb003ab318e04d250e0610c40cf5569900 /gcc/tree-ssa-strlen.c | |
parent | 9351cc79e32469c8c32424052167e71da6daabaf (diff) | |
download | gcc-aa59f000a84f3f0016bcb959a077047090c8d91c.tar.gz |
gcc/c-family/
* c-common.c (convert_vector_to_pointer_for_subscript): Remove
cast to unsigned type.
gcc/
* tree.h (tree_to_uhwi): Return an unsigned HOST_WIDE_INT.
* tree.c (tree_to_uhwi): Return an unsigned HOST_WIDE_INT.
(tree_ctz): Remove cast to unsigned type.
* builtins.c (fold_builtin_memory_op): Likewise.
* dwarf2out.c (descr_info_loc): Likewise.
* godump.c (go_output_typedef): Likewise.
* omp-low.c (expand_omp_simd): Likewise.
* stor-layout.c (excess_unit_span): Likewise.
* tree-object-size.c (addr_object_size): Likewise.
* tree-sra.c (analyze_all_variable_accesses): Likewise.
* tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
(simplify_rotate): Likewise.
* tree-ssa-strlen.c (adjust_last_stmt, handle_builtin_memcpy)
(handle_pointer_plus): Likewise.
* tree-switch-conversion.c (check_range): Likewise.
* tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
* tsan.c (instrument_builtin_call): Likewise.
* cfgexpand.c (defer_stack_allocation): Add cast to HOST_WIDE_INT.
* trans-mem.c (tm_log_add): Likewise.
* config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
* config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
* config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
* config/mips/mips.c (r10k_safe_mem_expr_p): Make offset unsigned.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
-rw-r--r-- | gcc/tree-ssa-strlen.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index bf2a5fb61d5..04e9ef4a0e2 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -850,12 +850,11 @@ adjust_last_stmt (strinfo si, gimple stmt, bool is_strcat) { if (!tree_fits_uhwi_p (last.len) || integer_zerop (len) - || (unsigned HOST_WIDE_INT) tree_to_uhwi (len) - != (unsigned HOST_WIDE_INT) tree_to_uhwi (last.len) + 1) + || tree_to_uhwi (len) != tree_to_uhwi (last.len) + 1) return; /* Don't adjust the length if it is divisible by 4, it is more efficient to store the extra '\0' in that case. */ - if ((((unsigned HOST_WIDE_INT) tree_to_uhwi (len)) & 3) == 0) + if ((tree_to_uhwi (len) & 3) == 0) return; } else if (TREE_CODE (len) == SSA_NAME) @@ -1337,8 +1336,7 @@ handle_builtin_memcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) /* Handle memcpy (x, "abcd", 5) or memcpy (x, "abc\0uvw", 7). */ if (!tree_fits_uhwi_p (len) - || (unsigned HOST_WIDE_INT) tree_to_uhwi (len) - <= (unsigned HOST_WIDE_INT) ~idx) + || tree_to_uhwi (len) <= (unsigned HOST_WIDE_INT) ~idx) return; } @@ -1627,8 +1625,7 @@ handle_pointer_plus (gimple_stmt_iterator *gsi) { tree off = gimple_assign_rhs2 (stmt); if (tree_fits_uhwi_p (off) - && (unsigned HOST_WIDE_INT) tree_to_uhwi (off) - <= (unsigned HOST_WIDE_INT) ~idx) + && tree_to_uhwi (off) <= (unsigned HOST_WIDE_INT) ~idx) ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] = ~(~idx - (int) tree_to_uhwi (off)); return; |