i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
authorUros Bizjak <ubizjak@gmail.com>
Mon, 17 Sep 2018 20:33:04 +0000 (22:33 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 17 Sep 2018 20:33:04 +0000 (22:33 +0200)
* config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.

From-SVN: r264373

gcc/ChangeLog
gcc/config/i386/i386.c

index 26d7be6..626c69d 100644 (file)
@@ -1,3 +1,7 @@
+2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
+
 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
 
        * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
index 96759de..0c86303 100644 (file)
@@ -43941,20 +43941,20 @@ void ix86_emit_i387_log1p (rtx op0, rtx op1)
   rtx test;
 
   emit_insn (gen_absxf2 (tmp, op1));
+  emit_move_insn (tmp2, standard_80387_constant_rtx (4)); /* fldln2 */
   test = gen_rtx_GE (VOIDmode, tmp,
     const_double_from_real_value (
        REAL_VALUE_ATOF ("0.29289321881345247561810596348408353", XFmode),
        XFmode));
-  emit_jump_insn (gen_cbranchxf4 (test, XEXP (test, 0), XEXP (test, 1), label1));
+  emit_jump_insn
+    (gen_cbranchxf4 (test, XEXP (test, 0), XEXP (test, 1), label1));
 
-  emit_move_insn (tmp2, standard_80387_constant_rtx (4)); /* fldln2 */
   emit_insn (gen_fyl2xp1xf3_i387 (op0, op1, tmp2));
   emit_jump (label2);
 
   emit_label (label1);
   emit_move_insn (tmp, CONST1_RTX (XFmode));
   emit_insn (gen_addxf3 (tmp, op1, tmp));
-  emit_move_insn (tmp2, standard_80387_constant_rtx (4)); /* fldln2 */
   emit_insn (gen_fyl2xxf3_i387 (op0, tmp, tmp2));
 
   emit_label (label2);