Hello!

For some reason, several expanders use operandN internal variable
instead of operands[N] from the array. Attached patch fixes this
oversight.

2011-11-03  Uros Bizjak  <ubiz...@gmail.com>

        * config/i386/i386.md (lround<X87MODEF:mode><SWI248x:mode>2,
        rint<mode>2, floor<mode>2, lfloor<MODEF:mode><SWI48:mode>2,
        btrunc<mode>2, lwp_lwpval<mode>3): Use operands[N] instead of operandN.

Tested on x86_64-pc-linux-gnu, committed to mainline. Similar patch
will be committed to 4.6 branch.

Uros.
Index: i386.md
===================================================================
--- i386.md     (revision 180832)
+++ i386.md     (working copy)
@@ -14663,7 +14663,7 @@
       else if (optimize_insn_for_size_p ())
         FAIL;
       else
-       ix86_expand_rint (operand0, operand1);
+       ix86_expand_rint (operands[0], operands[1]);
     }
   else
     {
@@ -14863,7 +14863,7 @@
       && <SWI248x:MODE>mode != HImode
       && ((<SWI248x:MODE>mode != DImode) || TARGET_64BIT)
       && !flag_trapping_math && !flag_rounding_math)
-    ix86_expand_lround (operand0, operand1);
+    ix86_expand_lround (operands[0], operands[1]);
   else
     ix86_emit_i387_round (operands[0], operands[1]);
   DONE;
@@ -14939,9 +14939,9 @@
       else if (optimize_insn_for_size_p ())
         FAIL;
       else if (TARGET_64BIT || (<MODE>mode != DFmode))
-       ix86_expand_floorceil (operand0, operand1, true);
+       ix86_expand_floorceil (operands[0], operands[1], true);
       else
-       ix86_expand_floorceildf_32 (operand0, operand1, true);
+       ix86_expand_floorceildf_32 (operands[0], operands[1], true);
     }
   else
     {
@@ -15123,7 +15123,7 @@
 {
   if (TARGET_64BIT && optimize_insn_for_size_p ())
     FAIL;
-  ix86_expand_lfloorceil (operand0, operand1, true);
+  ix86_expand_lfloorceil (operands[0], operands[1], true);
   DONE;
 })
 
@@ -15197,9 +15197,9 @@
       else if (optimize_insn_for_size_p ())
        FAIL;
       else if (TARGET_64BIT || (<MODE>mode != DFmode))
-       ix86_expand_floorceil (operand0, operand1, false);
+       ix86_expand_floorceil (operands[0], operands[1], false);
       else
-       ix86_expand_floorceildf_32 (operand0, operand1, false);
+       ix86_expand_floorceildf_32 (operands[0], operands[1], false);
     }
   else
     {
@@ -15379,7 +15379,7 @@
   "SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
    && !flag_trapping_math"
 {
-  ix86_expand_lfloorceil (operand0, operand1, false);
+  ix86_expand_lfloorceil (operands[0], operands[1], false);
   DONE;
 })
 
@@ -15453,9 +15453,9 @@
       else if (optimize_insn_for_size_p ())
        FAIL;
       else if (TARGET_64BIT || (<MODE>mode != DFmode))
-       ix86_expand_trunc (operand0, operand1);
+       ix86_expand_trunc (operands[0], operands[1]);
       else
-       ix86_expand_truncdf_32 (operand0, operand1);
+       ix86_expand_truncdf_32 (operands[0], operands[1]);
     }
   else
     {
@@ -18106,7 +18106,7 @@
                    UNSPECV_LWPVAL_INTRINSIC)]
   "TARGET_LWP"
   ;; Avoid unused variable warning.
-  "(void) operand0;")
+  "(void) operands[0];")
 
 (define_insn "*lwp_lwpval<mode>3_1"
   [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")

Reply via email to