From: rsandifo Date: Sun, 10 Nov 2013 12:57:36 +0000 (+0000) Subject: Fix modes used in LOAD_EXTEND_OP conversion. X-Git-Tag: upstream/5.3.0~8646^2~189 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecc41f4864bbfd3cbd694e93d6346fff3161022f;p=platform%2Fupstream%2Flinaro-gcc.git Fix modes used in LOAD_EXTEND_OP conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@204638 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/postreload.c b/gcc/postreload.c index b9d9717..7803b33 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -303,21 +303,19 @@ reload_cse_simplify_set (rtx set, rtx insn) switch (extend_op) { case ZERO_EXTEND: - result = wide_int (std::make_pair (this_rtx, GET_MODE (src))); - if (GET_MODE_PRECISION (GET_MODE (src)) - > GET_MODE_PRECISION (word_mode)) - result = wi::zext (result, GET_MODE_PRECISION (word_mode)); + result = wide_int::from (std::make_pair (this_rtx, + GET_MODE (src)), + BITS_PER_WORD, UNSIGNED); break; case SIGN_EXTEND: - result = wide_int (std::make_pair (this_rtx, GET_MODE (src))); - if (GET_MODE_PRECISION (GET_MODE (src)) - > GET_MODE_PRECISION (word_mode)) - result = wi::sext (result, GET_MODE_PRECISION (word_mode)); + result = wide_int::from (std::make_pair (this_rtx, + GET_MODE (src)), + BITS_PER_WORD, SIGNED); break; default: gcc_unreachable (); } - this_rtx = immed_wide_int_const (result, GET_MODE (src)); + this_rtx = immed_wide_int_const (result, word_mode); } #endif this_cost = set_src_cost (this_rtx, speed);