diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2013-01-04 19:19:22 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2013-01-04 19:19:22 +0100 |
commit | 918d445f1fe08cb05228e1b12052a55dfcd5401a (patch) | |
tree | 367cce20c7718b2089de1e00d65a291515ad71cf | |
parent | 82f2836c6e0eab99dc2ed4d761fbc611408902a1 (diff) | |
download | gcc-918d445f1fe08cb05228e1b12052a55dfcd5401a.zip gcc-918d445f1fe08cb05228e1b12052a55dfcd5401a.tar.gz gcc-918d445f1fe08cb05228e1b12052a55dfcd5401a.tar.bz2 |
i386.c (ix86_legitimize_address): Call convert_to_mode unconditionally.
* config/i386/i386.c (ix86_legitimize_address): Call convert_to_mode
unconditionally.
(ix86_expand_move): Ditto.
(ix86_zero_extend_to_Pmode): Ditto.
(ix86_expand_call): Ditto.
(ix86_expand_special_args_builtin): Ditto.
(ix86_expand_builtin): Ditto.
From-SVN: r194913
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 61 |
2 files changed, 27 insertions, 44 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1c6e735..be15aa3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2013-01-04 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.c (ix86_legitimize_address): Call convert_to_mode + unconditionally. + (ix86_expand_move): Ditto. + (ix86_zero_extend_to_Pmode): Ditto. + (ix86_expand_call): Ditto. + (ix86_expand_special_args_builtin): Ditto. + (ix86_expand_builtin): Ditto. + 2013-01-04 Richard Biener <rguenther@suse.de> PR tree-optimization/55862 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6dffe14..39c24a4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13247,8 +13247,7 @@ ix86_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, rtx val = force_operand (XEXP (x, 1), temp); if (val != temp) { - if (GET_MODE (val) != Pmode) - val = convert_to_mode (Pmode, val, 1); + val = convert_to_mode (Pmode, val, 1); emit_move_insn (temp, val); } @@ -13262,8 +13261,7 @@ ix86_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, rtx val = force_operand (XEXP (x, 0), temp); if (val != temp) { - if (GET_MODE (val) != Pmode) - val = convert_to_mode (Pmode, val, 1); + val = convert_to_mode (Pmode, val, 1); emit_move_insn (temp, val); } @@ -15931,8 +15929,7 @@ ix86_expand_move (enum machine_mode mode, rtx operands[]) op1 = force_operand (op1, op0); if (op1 == op0) return; - if (GET_MODE (op1) != mode) - op1 = convert_to_mode (mode, op1, 1); + op1 = convert_to_mode (mode, op1, 1); } else if (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op1)) @@ -16013,8 +16010,7 @@ ix86_expand_move (enum machine_mode mode, rtx operands[]) op1 = legitimize_pic_address (op1, reg); if (op0 == op1) return; - if (GET_MODE (op1) != mode) - op1 = convert_to_mode (mode, op1, 1); + op1 = convert_to_mode (mode, op1, 1); } } } @@ -21650,9 +21646,7 @@ ix86_adjust_counter (rtx countreg, HOST_WIDE_INT value) rtx ix86_zero_extend_to_Pmode (rtx exp) { - if (GET_MODE (exp) != Pmode) - exp = convert_to_mode (Pmode, exp, 1); - return force_reg (Pmode, exp); + return force_reg (Pmode, convert_to_mode (Pmode, exp, 1)); } /* Divide COUNTREG by SCALE. */ @@ -23624,9 +23618,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1, ? !sibcall_insn_operand (XEXP (fnaddr, 0), word_mode) : !call_insn_operand (XEXP (fnaddr, 0), word_mode)) { - fnaddr = XEXP (fnaddr, 0); - if (GET_MODE (fnaddr) != word_mode) - fnaddr = convert_to_mode (word_mode, fnaddr, 1); + fnaddr = convert_to_mode (word_mode, XEXP (fnaddr, 0), 1); fnaddr = gen_rtx_MEM (QImode, copy_to_mode_reg (word_mode, fnaddr)); } @@ -31276,9 +31268,8 @@ ix86_expand_special_args_builtin (const struct builtin_description *d, gcc_assert (target == 0); if (memory) { - if (GET_MODE (op) != Pmode) - op = convert_to_mode (Pmode, op, 1); - target = gen_rtx_MEM (tmode, force_reg (Pmode, op)); + op = force_reg (Pmode, convert_to_mode (Pmode, op, 1)); + target = gen_rtx_MEM (tmode, op); } else target = force_reg (tmode, op); @@ -31322,9 +31313,8 @@ ix86_expand_special_args_builtin (const struct builtin_description *d, if (i == memory) { /* This must be the memory operand. */ - if (GET_MODE (op) != Pmode) - op = convert_to_mode (Pmode, op, 1); - op = gen_rtx_MEM (mode, force_reg (Pmode, op)); + op = force_reg (Pmode, convert_to_mode (Pmode, op, 1)); + op = gen_rtx_MEM (mode, op); gcc_assert (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode); } @@ -31572,9 +31562,8 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, mode1 = insn_data[icode].operand[1].mode; mode2 = insn_data[icode].operand[2].mode; - if (GET_MODE (op0) != Pmode) - op0 = convert_to_mode (Pmode, op0, 1); - op0 = gen_rtx_MEM (mode1, force_reg (Pmode, op0)); + op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1)); + op0 = gen_rtx_MEM (mode1, op0); if (!insn_data[icode].operand[0].predicate (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); @@ -31605,11 +31594,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, op0 = expand_normal (arg0); icode = CODE_FOR_sse2_clflush; if (!insn_data[icode].operand[0].predicate (op0, Pmode)) - { - if (GET_MODE (op0) != Pmode) - op0 = convert_to_mode (Pmode, op0, 1); - op0 = force_reg (Pmode, op0); - } + op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1)); emit_insn (gen_sse2_clflush (op0)); return 0; @@ -31622,11 +31607,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, op1 = expand_normal (arg1); op2 = expand_normal (arg2); if (!REG_P (op0)) - { - if (GET_MODE (op0) != Pmode) - op0 = convert_to_mode (Pmode, op0, 1); - op0 = force_reg (Pmode, op0); - } + op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1)); if (!REG_P (op1)) op1 = copy_to_mode_reg (SImode, op1); if (!REG_P (op2)) @@ -31863,11 +31844,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, op0 = expand_normal (arg0); icode = CODE_FOR_lwp_llwpcb; if (!insn_data[icode].operand[0].predicate (op0, Pmode)) - { - if (GET_MODE (op0) != Pmode) - op0 = convert_to_mode (Pmode, op0, 1); - op0 = force_reg (Pmode, op0); - } + op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1)); emit_insn (gen_lwp_llwpcb (op0)); return 0; @@ -32013,9 +31990,7 @@ addcarryx: /* Generate CF from input operand. */ op1 = expand_normal (arg0); - if (GET_MODE (op1) != QImode) - op1 = convert_to_mode (QImode, op1, 1); - op1 = copy_to_mode_reg (QImode, op1); + op1 = copy_to_mode_reg (QImode, convert_to_mode (QImode, op1, 1)); emit_insn (gen_addqi3_cc (op0, op1, constm1_rtx)); /* Gen ADCX instruction to compute X+Y+CF. */ @@ -32165,9 +32140,7 @@ addcarryx: /* Force memory operand only with base register here. But we don't want to do it on memory operand for other builtin functions. */ - if (GET_MODE (op1) != Pmode) - op1 = convert_to_mode (Pmode, op1, 1); - op1 = force_reg (Pmode, op1); + op1 = force_reg (Pmode, convert_to_mode (Pmode, op1, 1)); if (!insn_data[icode].operand[1].predicate (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); |