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]

Re: [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math


> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12612
> 
> 
> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-18 18:44 -------
> Yep it is a machine description problem just like PR 12630 was.
> The idea is to use match_scratch: instead of match_dup.
Right,
This is patch I made for that yesterday.
OK?
Sat Oct 18 23:14:37 CEST 2003  Jan Hubicka  <jh@suse.cz>
	PR optimization/12612
	* i386.md (fyl2x patterns and expanders): Use match_scratch instead of match_dup.
Index: i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.485
diff -c -3 -p -r1.485 i386.md
*** i386.md	18 Oct 2003 07:24:59 -0000	1.485
--- i386.md	18 Oct 2003 21:07:30 -0000
***************
*** 15723,15729 ****
  		   (unspec:SF [(match_operand:SF 2 "register_operand" "0")
  			       (match_operand 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_dup 1))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations
     && GET_MODE (operands[1]) == (TARGET_128BIT_LONG_DOUBLE ? TFmode : XFmode)"
--- 15723,15729 ----
  		   (unspec:SF [(match_operand:SF 2 "register_operand" "0")
  			       (match_operand 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_scratch:SF 3 "1"))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations
     && GET_MODE (operands[1]) == (TARGET_128BIT_LONG_DOUBLE ? TFmode : XFmode)"
***************
*** 15736,15742 ****
  		   (unspec:DF [(match_operand:DF 2 "register_operand" "0")
  			       (match_operand 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_dup 1))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations
     && GET_MODE (operands[1]) == (TARGET_128BIT_LONG_DOUBLE ? TFmode : XFmode)"
--- 15736,15742 ----
  		   (unspec:DF [(match_operand:DF 2 "register_operand" "0")
  			       (match_operand 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_scratch:DF 3 "1"))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations
     && GET_MODE (operands[1]) == (TARGET_128BIT_LONG_DOUBLE ? TFmode : XFmode)"
***************
*** 15749,15755 ****
  		   (unspec:XF [(match_operand:XF 2 "register_operand" "0")
  			       (match_operand:XF 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_dup 1))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
    "fyl2x"
--- 15749,15755 ----
  		   (unspec:XF [(match_operand:XF 2 "register_operand" "0")
  			       (match_operand:XF 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_scratch:XF 3 "1"))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
    "fyl2x"
***************
*** 15761,15767 ****
  		   (unspec:TF [(match_operand:TF 2 "register_operand" "0")
  			       (match_operand:TF 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_dup 1))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
    "fyl2x"
--- 15761,15767 ----
  		   (unspec:TF [(match_operand:TF 2 "register_operand" "0")
  			       (match_operand:TF 1 "register_operand" "u")]
  		    UNSPEC_FYL2X))
! 	      (clobber (match_scratch:TF 3 "1"))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
    "fyl2x"
***************
*** 15772,15778 ****
    [(parallel [(set (match_operand:SF 0 "register_operand" "")
  		   (unspec:SF [(match_operand:SF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_dup 2))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations"
  {
--- 15772,15778 ----
    [(parallel [(set (match_operand:SF 0 "register_operand" "")
  		   (unspec:SF [(match_operand:SF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_scratch:SF 3 ""))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations"
  {
***************
*** 15787,15793 ****
    [(parallel [(set (match_operand:DF 0 "register_operand" "")
  		   (unspec:DF [(match_operand:DF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_dup 2))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations"
  {
--- 15787,15793 ----
    [(parallel [(set (match_operand:DF 0 "register_operand" "")
  		   (unspec:DF [(match_operand:DF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_scratch:DF 3 ""))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations"
  {
***************
*** 15802,15808 ****
    [(parallel [(set (match_operand:XF 0 "register_operand" "")
  		   (unspec:XF [(match_operand:XF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_dup 2))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
  {
--- 15802,15808 ----
    [(parallel [(set (match_operand:XF 0 "register_operand" "")
  		   (unspec:XF [(match_operand:XF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_scratch:XF 3 ""))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
  {
***************
*** 15817,15823 ****
    [(parallel [(set (match_operand:TF 0 "register_operand" "")
  		   (unspec:TF [(match_operand:TF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_dup 2))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
  {
--- 15817,15823 ----
    [(parallel [(set (match_operand:TF 0 "register_operand" "")
  		   (unspec:TF [(match_operand:TF 1 "register_operand" "")
  			       (match_dup 2)] UNSPEC_FYL2X))
! 	      (clobber (match_scratch:TF 3 ""))])]
    "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
     && flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
  {


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