This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Make i386 builtin expanders honour optimize_size


This patch goes over the math optabs and conditionalizes expansion on
optimize_size where it is profitable.  This shrinks text size of simple
wrappers from 1622 bytes to 1129 bytes.

Bootstrapped and tested on {x86_64,i686}-linux-gnu.

Ok for mainline?

Thanks,
Richard.

2006-10-30  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.md (asindf2, asinsf2, asinxf2, acosdf2,
	acossf2, acosxf2, log1psf2, log1pdf2, log1pxf2, ilogbsi2,
	expsf2, expdf2, expxf2, exp10sf2, exp10df2, exp10xf2,
	exp2sf2, exp2df2, exp2xf2, expm1df2, expm1sf2, expm1xf2,
	ldexpdf3, ldexpsf3, ldexpxf3, rintxf2, rintdf2, rintsf2,
	lround<mode>di2, lround<mode>si2, floorxf2, floordf2, floorsf2,
	lfloor<mode>di2, lfloor<mode>si2, ceilxf2, ceildf2, ceilsf2,
	btruncxf2, btruncdf2, btruncsf2): Conditionalize expansion on
	!optimize_size.

Index: config/i386/i386.md
===================================================================
*** config/i386/i386.md	(revision 118179)
--- config/i386/i386.md	(working copy)
*************** (define_expand "asindf2"
*** 16262,16268 ****
  	(float_truncate:DF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16262,16268 ----
  	(float_truncate:DF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "asinsf2"
*** 16286,16292 ****
  	(float_truncate:SF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16286,16292 ----
  	(float_truncate:SF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "asinxf2"
*** 16307,16313 ****
  			      UNSPEC_FPATAN))
     	      (clobber (match_scratch:XF 6 ""))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16307,16313 ----
  			      UNSPEC_FPATAN))
     	      (clobber (match_scratch:XF 6 ""))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "acosdf2"
*** 16331,16337 ****
  	(float_truncate:DF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16331,16337 ----
  	(float_truncate:DF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "acossf2"
*** 16355,16361 ****
  	(float_truncate:SF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16355,16361 ----
  	(float_truncate:SF (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "acosxf2"
*** 16376,16382 ****
  			      UNSPEC_FPATAN))
     	      (clobber (match_scratch:XF 6 ""))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16376,16382 ----
  			      UNSPEC_FPATAN))
     	      (clobber (match_scratch:XF 6 ""))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "log1psf2"
*** 16589,16595 ****
     (use (match_operand:SF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx op0 = gen_reg_rtx (XFmode);
    rtx op1 = gen_reg_rtx (XFmode);
--- 16589,16595 ----
     (use (match_operand:SF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx op0 = gen_reg_rtx (XFmode);
    rtx op1 = gen_reg_rtx (XFmode);
*************** (define_expand "log1pdf2"
*** 16605,16611 ****
     (use (match_operand:DF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx op0 = gen_reg_rtx (XFmode);
    rtx op1 = gen_reg_rtx (XFmode);
--- 16605,16611 ----
     (use (match_operand:DF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx op0 = gen_reg_rtx (XFmode);
    rtx op1 = gen_reg_rtx (XFmode);
*************** (define_expand "log1pxf2"
*** 16620,16626 ****
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    ix86_emit_i387_log1p (operands[0], operands[1]);
    DONE;
--- 16620,16626 ----
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    ix86_emit_i387_log1p (operands[0], operands[1]);
    DONE;
*************** (define_expand "ilogbsi2"
*** 16697,16703 ****
  	      (clobber (reg:CC FLAGS_REG))])]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    operands[2] = gen_reg_rtx (XFmode);
    operands[3] = gen_reg_rtx (XFmode);
--- 16697,16703 ----
  	      (clobber (reg:CC FLAGS_REG))])]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    operands[2] = gen_reg_rtx (XFmode);
    operands[3] = gen_reg_rtx (XFmode);
*************** (define_expand "expsf2"
*** 16745,16751 ****
  	(float_truncate:SF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 16745,16751 ----
  	(float_truncate:SF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "expdf2"
*** 16775,16781 ****
  	(float_truncate:DF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 16775,16781 ----
  	(float_truncate:DF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "expxf2"
*** 16801,16807 ****
  		   (unspec:XF [(match_dup 8) (match_dup 4)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 16801,16807 ----
  		   (unspec:XF [(match_dup 8) (match_dup 4)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "exp10sf2"
*** 16831,16837 ****
  	(float_truncate:SF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 16831,16837 ----
  	(float_truncate:SF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "exp10df2"
*** 16861,16867 ****
  	(float_truncate:DF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 16861,16867 ----
  	(float_truncate:DF (match_dup 10)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "exp10xf2"
*** 16887,16893 ****
  		   (unspec:XF [(match_dup 8) (match_dup 4)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 16887,16893 ----
  		   (unspec:XF [(match_dup 8) (match_dup 4)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "exp2sf2"
*** 16916,16922 ****
  	(float_truncate:SF (match_dup 8)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16916,16922 ----
  	(float_truncate:SF (match_dup 8)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "exp2df2"
*** 16942,16948 ****
  	(float_truncate:DF (match_dup 8)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16942,16948 ----
  	(float_truncate:DF (match_dup 8)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "exp2xf2"
*** 16964,16970 ****
  		   (unspec:XF [(match_dup 7) (match_dup 3)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 16964,16970 ----
  		   (unspec:XF [(match_dup 7) (match_dup 3)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "expm1df2"
*** 16998,17004 ****
  	(float_truncate:DF (match_dup 14)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 16998,17004 ----
  	(float_truncate:DF (match_dup 14)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "expm1sf2"
*** 17035,17041 ****
  	(float_truncate:SF (match_dup 14)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 17035,17041 ----
  	(float_truncate:SF (match_dup 14)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "expm1xf2"
*** 17069,17075 ****
     (set (match_operand:XF 0 "register_operand" "")
  	(plus:XF (match_dup 12) (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    rtx temp;
    int i;
--- 17069,17075 ----
     (set (match_operand:XF 0 "register_operand" "")
  	(plus:XF (match_dup 12) (match_dup 7)))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    rtx temp;
    int i;
*************** (define_expand "ldexpdf3"
*** 17096,17102 ****
  	(float_truncate:DF (match_dup 5)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 17096,17102 ----
  	(float_truncate:DF (match_dup 5)))]
    "TARGET_USE_FANCY_MATH_387
     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "ldexpsf3"
*** 17119,17125 ****
  	(float_truncate:SF (match_dup 5)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 17119,17125 ----
  	(float_truncate:SF (match_dup 5)))]
    "TARGET_USE_FANCY_MATH_387
     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "ldexpxf3"
*** 17138,17144 ****
  		   (unspec:XF [(match_dup 1) (match_dup 3)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    int i;
  
--- 17138,17144 ----
  		   (unspec:XF [(match_dup 1) (match_dup 3)]
  			      UNSPEC_FSCALE_EXP))])]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    int i;
  
*************** (define_expand "rintdf2"
*** 17164,17183 ****
      && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
      && flag_unsafe_math_optimizations)
     || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math)"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      ix86_expand_rint (operand0, operand1);
    else
      {
!   rtx op0 = gen_reg_rtx (XFmode);
!   rtx op1 = gen_reg_rtx (XFmode);
  
!   emit_insn (gen_extenddfxf2 (op1, operands[1]));
!   emit_insn (gen_frndintxf2 (op0, op1));
  
!   emit_insn (gen_truncxfdf2_i387_noop (operands[0], op0));
      }
    DONE;
  })
--- 17164,17185 ----
      && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
      && flag_unsafe_math_optimizations)
     || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      ix86_expand_rint (operand0, operand1);
    else
      {
!       rtx op0 = gen_reg_rtx (XFmode);
!       rtx op1 = gen_reg_rtx (XFmode);
  
!       emit_insn (gen_extenddfxf2 (op1, operands[1]));
!       emit_insn (gen_frndintxf2 (op0, op1));
  
!       emit_insn (gen_truncxfdf2_i387_noop (operands[0], op0));
      }
    DONE;
  })
*************** (define_expand "rintsf2"
*** 17189,17208 ****
      && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
      && flag_unsafe_math_optimizations)
     || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math)"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      ix86_expand_rint (operand0, operand1);
    else
      {
!   rtx op0 = gen_reg_rtx (XFmode);
!   rtx op1 = gen_reg_rtx (XFmode);
  
!   emit_insn (gen_extendsfxf2 (op1, operands[1]));
!   emit_insn (gen_frndintxf2 (op0, op1));
  
!   emit_insn (gen_truncxfsf2_i387_noop (operands[0], op0));
      }
    DONE;
  })
--- 17191,17212 ----
      && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
      && flag_unsafe_math_optimizations)
     || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      ix86_expand_rint (operand0, operand1);
    else
      {
!       rtx op0 = gen_reg_rtx (XFmode);
!       rtx op1 = gen_reg_rtx (XFmode);
  
!       emit_insn (gen_extendsfxf2 (op1, operands[1]));
!       emit_insn (gen_frndintxf2 (op0, op1));
  
!       emit_insn (gen_truncxfsf2_i387_noop (operands[0], op0));
      }
    DONE;
  })
*************** (define_expand "rintxf2"
*** 17211,17217 ****
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    emit_insn (gen_frndintxf2 (operands[0], operands[1]));
    DONE;
--- 17215,17221 ----
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    emit_insn (gen_frndintxf2 (operands[0], operands[1]));
    DONE;
*************** (define_expand "lround<mode>di2"
*** 17392,17398 ****
    [(match_operand:DI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH && TARGET_64BIT
!    && !flag_trapping_math && !flag_rounding_math"
  {
    ix86_expand_lround (operand0, operand1);
    DONE;
--- 17396,17403 ----
    [(match_operand:DI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH && TARGET_64BIT
!    && !flag_trapping_math && !flag_rounding_math
!    && !optimize_size"
  {
    ix86_expand_lround (operand0, operand1);
    DONE;
*************** (define_expand "lround<mode>si2"
*** 17402,17408 ****
    [(match_operand:SI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
!    && !flag_trapping_math && !flag_rounding_math"
  {
    ix86_expand_lround (operand0, operand1);
    DONE;
--- 17407,17414 ----
    [(match_operand:SI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
!    && !flag_trapping_math && !flag_rounding_math
!    && !optimize_size"
  {
    ix86_expand_lround (operand0, operand1);
    DONE;
*************** (define_expand "floorxf2"
*** 17451,17457 ****
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    emit_insn (gen_frndintxf2_floor (operands[0], operands[1]));
    DONE;
--- 17457,17463 ----
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    emit_insn (gen_frndintxf2_floor (operands[0], operands[1]));
    DONE;
*************** (define_expand "floorxf2"
*** 17460,17475 ****
  (define_expand "floordf2"
    [(use (match_operand:DF 0 "register_operand" ""))
     (use (match_operand:DF 1 "register_operand" ""))]
!   "(TARGET_USE_FANCY_MATH_387
!     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!     && flag_unsafe_math_optimizations)
!    || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      {
        if (TARGET_64BIT)
  	ix86_expand_floorceil (operand0, operand1, true);
--- 17466,17480 ----
  (define_expand "floordf2"
    [(use (match_operand:DF 0 "register_operand" ""))
     (use (match_operand:DF 1 "register_operand" ""))]
!   "((TARGET_USE_FANCY_MATH_387
!      && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!      && flag_unsafe_math_optimizations)
!     || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!         && !flag_trapping_math))
!    && !optimize_size"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      {
        if (TARGET_64BIT)
  	ix86_expand_floorceil (operand0, operand1, true);
*************** (define_expand "floordf2"
*** 17492,17507 ****
  (define_expand "floorsf2"
    [(use (match_operand:SF 0 "register_operand" ""))
     (use (match_operand:SF 1 "register_operand" ""))]
!   "(TARGET_USE_FANCY_MATH_387
!     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!     && flag_unsafe_math_optimizations)
!    || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      ix86_expand_floorceil (operand0, operand1, true);
    else
      {
--- 17497,17511 ----
  (define_expand "floorsf2"
    [(use (match_operand:SF 0 "register_operand" ""))
     (use (match_operand:SF 1 "register_operand" ""))]
!   "((TARGET_USE_FANCY_MATH_387
!      && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!      && flag_unsafe_math_optimizations)
!     || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!         && !flag_trapping_math))
!    && !optimize_size"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      ix86_expand_floorceil (operand0, operand1, true);
    else
      {
*************** (define_expand "lfloor<mode>di2"
*** 17678,17684 ****
    [(match_operand:DI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH && TARGET_64BIT
!    && !flag_trapping_math"
  {
    ix86_expand_lfloorceil (operand0, operand1, true);
    DONE;
--- 17682,17689 ----
    [(match_operand:DI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH && TARGET_64BIT
!    && !flag_trapping_math
!    && !optimize_size"
  {
    ix86_expand_lfloorceil (operand0, operand1, true);
    DONE;
*************** (define_expand "lfloor<mode>si2"
*** 17688,17694 ****
    [(match_operand:SI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
!    && !flag_trapping_math"
  {
    ix86_expand_lfloorceil (operand0, operand1, true);
    DONE;
--- 17693,17700 ----
    [(match_operand:SI 0 "nonimmediate_operand" "")
     (match_operand:SSEMODEF 1 "register_operand" "")]
    "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
!    && !flag_trapping_math
!    && (!optimize_size || !TARGET_64BIT)"
  {
    ix86_expand_lfloorceil (operand0, operand1, true);
    DONE;
*************** (define_expand "ceilxf2"
*** 17737,17743 ****
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    emit_insn (gen_frndintxf2_ceil (operands[0], operands[1]));
    DONE;
--- 17743,17749 ----
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    emit_insn (gen_frndintxf2_ceil (operands[0], operands[1]));
    DONE;
*************** (define_expand "ceilxf2"
*** 17746,17761 ****
  (define_expand "ceildf2"
    [(use (match_operand:DF 0 "register_operand" ""))
     (use (match_operand:DF 1 "register_operand" ""))]
!   "(TARGET_USE_FANCY_MATH_387
!     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!     && flag_unsafe_math_optimizations)
!    || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      {
        if (TARGET_64BIT)
  	ix86_expand_floorceil (operand0, operand1, false);
--- 17752,17766 ----
  (define_expand "ceildf2"
    [(use (match_operand:DF 0 "register_operand" ""))
     (use (match_operand:DF 1 "register_operand" ""))]
!   "((TARGET_USE_FANCY_MATH_387
!      && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!      && flag_unsafe_math_optimizations)
!     || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!         && !flag_trapping_math))
!    && !optimize_size"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      {
        if (TARGET_64BIT)
  	ix86_expand_floorceil (operand0, operand1, false);
*************** (define_expand "ceildf2"
*** 17778,17793 ****
  (define_expand "ceilsf2"
    [(use (match_operand:SF 0 "register_operand" ""))
     (use (match_operand:SF 1 "register_operand" ""))]
!   "(TARGET_USE_FANCY_MATH_387
!     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!     && flag_unsafe_math_optimizations)
!    || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      ix86_expand_floorceil (operand0, operand1, false);
    else
      {
--- 17783,17797 ----
  (define_expand "ceilsf2"
    [(use (match_operand:SF 0 "register_operand" ""))
     (use (match_operand:SF 1 "register_operand" ""))]
!   "((TARGET_USE_FANCY_MATH_387
!      && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!      && flag_unsafe_math_optimizations)
!     || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!         && !flag_trapping_math))
!    && !optimize_size"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      ix86_expand_floorceil (operand0, operand1, false);
    else
      {
*************** (define_expand "btruncxf2"
*** 18023,18029 ****
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations"
  {
    emit_insn (gen_frndintxf2_trunc (operands[0], operands[1]));
    DONE;
--- 18027,18033 ----
    [(use (match_operand:XF 0 "register_operand" ""))
     (use (match_operand:XF 1 "register_operand" ""))]
    "TARGET_USE_FANCY_MATH_387
!    && flag_unsafe_math_optimizations && !optimize_size"
  {
    emit_insn (gen_frndintxf2_trunc (operands[0], operands[1]));
    DONE;
*************** (define_expand "btruncxf2"
*** 18032,18047 ****
  (define_expand "btruncdf2"
    [(use (match_operand:DF 0 "register_operand" ""))
     (use (match_operand:DF 1 "register_operand" ""))]
!   "(TARGET_USE_FANCY_MATH_387
!     && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!     && flag_unsafe_math_optimizations)
!    || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      {
        if (TARGET_64BIT)
  	ix86_expand_trunc (operand0, operand1);
--- 18036,18050 ----
  (define_expand "btruncdf2"
    [(use (match_operand:DF 0 "register_operand" ""))
     (use (match_operand:DF 1 "register_operand" ""))]
!   "((TARGET_USE_FANCY_MATH_387
!      && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)
!      && flag_unsafe_math_optimizations)
!     || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!         && !flag_trapping_math))
!    && !optimize_size"
  {
    if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      {
        if (TARGET_64BIT)
  	ix86_expand_trunc (operand0, operand1);
*************** (define_expand "btruncdf2"
*** 18064,18079 ****
  (define_expand "btruncsf2"
    [(use (match_operand:SF 0 "register_operand" ""))
     (use (match_operand:SF 1 "register_operand" ""))]
!   "(TARGET_USE_FANCY_MATH_387
!     && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!     && flag_unsafe_math_optimizations)
!    || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!        && !flag_trapping_math
!        && !optimize_size)"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math
!       && !optimize_size)
      ix86_expand_trunc (operand0, operand1);
    else
      {
--- 18067,18081 ----
  (define_expand "btruncsf2"
    [(use (match_operand:SF 0 "register_operand" ""))
     (use (match_operand:SF 1 "register_operand" ""))]
!   "((TARGET_USE_FANCY_MATH_387
!      && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
!      && flag_unsafe_math_optimizations)
!     || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!         && !flag_trapping_math))
!    && !optimize_size"
  {
    if (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH
!       && !flag_trapping_math)
      ix86_expand_trunc (operand0, operand1);
    else
      {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]