Hello!

2013-11-21  Uros Bizjak  <ubiz...@gmail.com>

    * config/i386/i386.c (ix86_expand_special_args_builtin): Use
    ix86_zero_extend_to_Pmode where appropriate.
    (ix86_expand_builtin): Ditto.

Tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN.

Uros.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 205232)
+++ config/i386/i386.c  (working copy)
@@ -32577,7 +32577,7 @@ ix86_expand_special_args_builtin (const struct bui
       gcc_assert (target == 0);
       if (memory)
        {
-         op = force_reg (Pmode, convert_to_mode (Pmode, op, 1));
+         op = ix86_zero_extend_to_Pmode (op);
          target = gen_rtx_MEM (tmode, op);
        }
       else
@@ -32622,7 +32622,7 @@ ix86_expand_special_args_builtin (const struct bui
          if (i == memory)
            {
              /* This must be the memory operand.  */
-             op = force_reg (Pmode, convert_to_mode (Pmode, op, 1));
+             op = ix86_zero_extend_to_Pmode (op);
              op = gen_rtx_MEM (mode, op);
              gcc_assert (GET_MODE (op) == mode
                          || GET_MODE (op) == VOIDmode);
@@ -32870,7 +32870,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx sub
       mode1 = insn_data[icode].operand[1].mode;
       mode2 = insn_data[icode].operand[2].mode;
 
-      op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1));
+      op0 = ix86_zero_extend_to_Pmode (op0);
       op0 = gen_rtx_MEM (mode1, op0);
 
       if (!insn_data[icode].operand[0].predicate (op0, mode0))
@@ -32902,7 +32902,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx sub
        op0 = expand_normal (arg0);
        icode = CODE_FOR_sse2_clflush;
        if (!insn_data[icode].operand[0].predicate (op0, Pmode))
-         op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1));
+         op0 = ix86_zero_extend_to_Pmode (op0);
 
        emit_insn (gen_sse2_clflush (op0));
        return 0;
@@ -32915,7 +32915,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx sub
       op1 = expand_normal (arg1);
       op2 = expand_normal (arg2);
       if (!REG_P (op0))
-       op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1));
+       op0 = ix86_zero_extend_to_Pmode (op0);
       if (!REG_P (op1))
        op1 = copy_to_mode_reg (SImode, op1);
       if (!REG_P (op2))
@@ -33172,7 +33172,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx sub
       op0 = expand_normal (arg0);
       icode = CODE_FOR_lwp_llwpcb;
       if (!insn_data[icode].operand[0].predicate (op0, Pmode))
-       op0 = force_reg (Pmode, convert_to_mode (Pmode, op0, 1));
+       op0 = ix86_zero_extend_to_Pmode (op0);
       emit_insn (gen_lwp_llwpcb (op0));
       return 0;
 
@@ -33468,7 +33468,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.  */
-      op1 = force_reg (Pmode, convert_to_mode (Pmode, op1, 1));
+      op1 = ix86_zero_extend_to_Pmode (op1);
 
       if (!insn_data[icode].operand[1].predicate (op0, mode0))
        op0 = copy_to_mode_reg (mode0, op0);

Reply via email to