public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math
@ 2003-10-14 7:51 martin at mpa-garching dot mpg dot de
2003-10-14 7:53 ` [Bug c++/12612] " martin at mpa-garching dot mpg dot de
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2003-10-14 7:51 UTC (permalink / raw)
To: gcc-bugs
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
Summary: ICE when compiling with -O3 -ffast-math
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at mpa-garching dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org,martin at mpa-garching
dot mpg dot de
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
gcc version 3.4 20031014 (experimental) crashes with an ICE when
compiling the attached code with -O3 -ffast-math:
~/data/planck/LevelS/Sampler>g++ -v -c -O3 -ffast-math sampler.ii
Reading specs from /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.4/specs
Configured with: /scratch/gcc/configure --prefix=/afs/mpa/data/martin/ugcc
--enable-languages=c++ --disable-checking
Thread model: posix
gcc version 3.4 20031014 (experimental)
/afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus
-fpreprocessed sampler.ii -quiet -dumpbase sampler.ii -mtune=pentiumpro -auxbase
sampler -O3 -version -ffast-math -o /tmp/ccycYGAB.s
GNU C++ version 3.4 20031014 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.4 20031014 (experimental).
GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=63442
sampler.cc: In function `int main(int, char**)':
sampler.cc:192: error: unrecognizable insn:
(insn:HI 6444 6442 6445 619 (parallel [
(set (reg:DF 2256)
(unspec:DF [
(reg:DF 2263)
(reg:XF 5025)
] 66))
(clobber (reg:XF 5412))
]) -1 (insn_list 6442 (nil))
(expr_list:REG_DEAD (reg:DF 2263)
(expr_list:REG_UNUSED (reg:XF 5412)
(expr_list:REG_EQUAL (unspec:DF [
(reg:DF 2263)
(reg:XF 2264)
] 66)
(nil)))))
sampler.cc:192: internal compiler error: in extract_insn, at recog.c:2064
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
The bug appears to be relatively new; it didn't trigger about two weeks ago.
Sorry for the long testcase; I currently don't have time to reduce it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/12612] ICE when compiling with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
@ 2003-10-14 7:53 ` martin at mpa-garching dot mpg dot de
2003-10-14 16:22 ` [Bug optimization/12612] [3.4 Regression] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2003-10-14 7:53 UTC (permalink / raw)
To: gcc-bugs
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 martin at mpa-garching dot mpg dot de 2003-10-14 07:53 -------
Created an attachment (id=4932)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4932&action=view)
A (long) testcase to reproduce the bug
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when compiling with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
2003-10-14 7:53 ` [Bug c++/12612] " martin at mpa-garching dot mpg dot de
@ 2003-10-14 16:22 ` pinskia at gcc dot gnu dot org
2003-10-17 16:38 ` [Bug optimization/12612] [3.4 Regression] ICE when using log function " reichelt at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-14 16:22 UTC (permalink / raw)
To: gcc-bugs
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
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |optimization
Keywords| |ice-on-valid-code
Summary|ICE when compiling with -O3 |[3.4 Regression] ICE when
|-ffast-math |compiling with -O3 -ffast-
| |math
Target Milestone|--- |3.4
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-14 16:22 -------
It is a very new bug, as it does not occur in the mainline 20031009.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
2003-10-14 7:53 ` [Bug c++/12612] " martin at mpa-garching dot mpg dot de
2003-10-14 16:22 ` [Bug optimization/12612] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2003-10-17 16:38 ` reichelt at gcc dot gnu dot org
2003-10-17 17:41 ` reichelt at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-10-17 16:38 UTC (permalink / raw)
To: gcc-bugs
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
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |monitored
Last reconfirmed|0000-00-00 00:00:00 |2003-10-17 16:37:30
date| |
Summary|[3.4 Regression] ICE when |[3.4 Regression] ICE when
|compiling with -O3 -ffast- |using log function with -O3
|math |-ffast-math
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-10-17 16:37 -------
Here's a short testcase that crashes cc1 and cc1plus when compiled with
"-O3 -ffast-math":
=============================
double log (double);
void foo (double* x)
{
int i;
for (i=0; i<1; ++i)
x[0]=log(2.0);
}
=============================
The error message is:
PR12612.c: In function `foo':
PR12612.c:8: error: unrecognizable insn:
(insn:HI 66 57 33 0 (parallel [
(set (reg:DF 60)
(unspec:DF [
(reg:DF 64)
(reg:XF 63)
] 66))
(clobber (reg:XF 70))
]) -1 (insn_list 56 (insn_list 57 (nil)))
(expr_list:REG_DEAD (reg:XF 63)
(expr_list:REG_DEAD (reg:DF 64)
(expr_list:REG_UNUSED (reg:XF 70)
(nil)))))
PR12612.c:8: internal compiler error: in extract_insn, at recog.c:2064
If I replace the log function by sin, cos, exp, the code compiles.
According to Phil's regression hunter, the regression was introduced
between 2003-10-10-trunk (#422) and 2003-10-12-trunk (#423).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (3 preceding siblings ...)
2003-10-17 17:41 ` reichelt at gcc dot gnu dot org
@ 2003-10-17 17:41 ` pinskia at gcc dot gnu dot org
2003-10-17 18:12 ` reichelt at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-17 17:41 UTC (permalink / raw)
To: gcc-bugs
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-17 17:41 -------
Most likely another machine description problem like PR 12630 was.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (2 preceding siblings ...)
2003-10-17 16:38 ` [Bug optimization/12612] [3.4 Regression] ICE when using log function " reichelt at gcc dot gnu dot org
@ 2003-10-17 17:41 ` reichelt at gcc dot gnu dot org
2003-10-17 17:41 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-10-17 17:41 UTC (permalink / raw)
To: gcc-bugs
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
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at ucw dot cz
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-10-17 17:29 -------
Jan,
it looks like your patch
http://gcc.gnu.org/ml/gcc-cvs/2003-10/msg00441.html
is responsible for the regression.
Could you please have a look?
Thanks,
Volker
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (4 preceding siblings ...)
2003-10-17 17:41 ` pinskia at gcc dot gnu dot org
@ 2003-10-17 18:12 ` reichelt at gcc dot gnu dot org
2003-10-17 18:13 ` hubicka at ucw dot cz
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-10-17 18:12 UTC (permalink / raw)
To: gcc-bugs
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 reichelt at gcc dot gnu dot org 2003-10-17 17:54 -------
Something with the optimization -fweb seems to be wrong.
Because of Jan's patch it's turned on with -O3.
That's probably why the bug appears with the patch.
Btw, just specifying the option "-fweb" on the command
line causes an ICE:
cc1: internal compiler error: in common_handle_option, at opts.c:656
Please submit a full bug report, [etc.]
In addition the documentation is quite incomplete: "-fweb" is only
mentioned once in the manual:
Optimize yet more. @option{-O3} turns on all optimizations specified by
@option{-O2} and also turns on the @option{-finline-functions},
@option{-fweb} and @option{-frename-registers} options.
But nowhere is an explanation what "-fweb actually" does and it doesn't
appear in the list of optimization options.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (5 preceding siblings ...)
2003-10-17 18:12 ` reichelt at gcc dot gnu dot org
@ 2003-10-17 18:13 ` hubicka at ucw dot cz
2003-10-18 18:49 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hubicka at ucw dot cz @ 2003-10-17 18:13 UTC (permalink / raw)
To: gcc-bugs
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 hubicka at ucw dot cz 2003-10-17 18:12 -------
Subject: Re: [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 reichelt at gcc dot gnu dot org 2003-10-17 17:54 -------
> Something with the optimization -fweb seems to be wrong.
> Because of Jan's patch it's turned on with -O3.
> That's probably why the bug appears with the patch.
>
> Btw, just specifying the option "-fweb" on the command
> line causes an ICE:
>
> cc1: internal compiler error: in common_handle_option, at opts.c:656
> Please submit a full bug report, [etc.]
>
> In addition the documentation is quite incomplete: "-fweb" is only
> mentioned once in the manual:
>
> Optimize yet more. @option{-O3} turns on all optimizations specified by
> @option{-O2} and also turns on the @option{-finline-functions},
> @option{-fweb} and @option{-frename-registers} options.
>
> But nowhere is an explanation what "-fweb actually" does and it doesn't
> appear in the list of optimization options.
This looks like some hunk of patch got lost. I definitly wrote
documentation for that. I will fix that.
Thanks,
Honza
>
>
>
>
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (6 preceding siblings ...)
2003-10-17 18:13 ` hubicka at ucw dot cz
@ 2003-10-18 18:49 ` pinskia at gcc dot gnu dot org
2003-10-18 23:17 ` hubicka at ucw dot cz
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-18 18:49 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (7 preceding siblings ...)
2003-10-18 18:49 ` pinskia at gcc dot gnu dot org
@ 2003-10-18 23:17 ` hubicka at ucw dot cz
2003-10-18 23:21 ` hubicka at ucw dot cz
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hubicka at ucw dot cz @ 2003-10-18 23:17 UTC (permalink / raw)
To: gcc-bugs
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 hubicka at ucw dot cz 2003-10-18 21:29 -------
Subject: Re: [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"
{
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (8 preceding siblings ...)
2003-10-18 23:17 ` hubicka at ucw dot cz
@ 2003-10-18 23:21 ` hubicka at ucw dot cz
2003-10-19 17:26 ` rth at redhat dot com
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hubicka at ucw dot cz @ 2003-10-18 23:21 UTC (permalink / raw)
To: gcc-bugs
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 hubicka at ucw dot cz 2003-10-18 23:17 -------
Subject: Re: [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.
It is actually more than that. Several other patterns uses same scheme.
Additionally they use bogus extra parallel that confuses genrecog
handling of clobbers and finally reg-stack needs to be updated to
produce insns that still match.
I am still testing the attached patch, OK assuming it pass?
Honza
2003-10-19 Jan Hubicka <jh@suse.cz>
* reg-stack.c (subst_stack_regs_pat): Use st(1) for clobbers.
* i386.md (fpatan, fyl2x, fscale patterns and expanders): Use
match_scratch; avoid bogus paralles.
Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reg-stack.c,v
retrieving revision 1.134
diff -c -3 -p -r1.134 reg-stack.c
*** reg-stack.c 5 Oct 2003 19:50:55 -0000 1.134
--- reg-stack.c 18 Oct 2003 23:12:35 -0000
*************** subst_stack_regs_pat (rtx insn, stack re
*** 1430,1436 ****
abort ();
}
remove_note (insn, note);
! replace_reg (dest, LAST_STACK_REG);
}
else
{
--- 1430,1436 ----
abort ();
}
remove_note (insn, note);
! replace_reg (dest, FIRST_STACK_REG + 1);
}
else
{
Index: config/i386/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
*** config/i386/i386.md 18 Oct 2003 07:24:59 -0000 1.485
--- config/i386/i386.md 18 Oct 2003 23:12:38 -0000
***************
*** 15619,15629 ****
(set_attr "mode" "XF")])
(define_insn "atan2df3_1"
! [(parallel [(set (match_operand:DF 0 "register_operand" "=f")
! (unspec:DF [(match_operand:DF 2 "register_operand" "0")
! (match_operand:DF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
"fpatan"
--- 15619,15629 ----
(set_attr "mode" "XF")])
(define_insn "atan2df3_1"
! [(set (match_operand:DF 0 "register_operand" "=f")
! (unspec:DF [(match_operand:DF 2 "register_operand" "0")
! (match_operand:DF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_scratch:DF 3 "=1"))]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
"fpatan"
***************
*** 15644,15654 ****
})
(define_insn "atan2sf3_1"
! [(parallel [(set (match_operand:SF 0 "register_operand" "=f")
! (unspec:SF [(match_operand:SF 2 "register_operand" "0")
! (match_operand:SF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
"fpatan"
--- 15644,15654 ----
})
(define_insn "atan2sf3_1"
! [(set (match_operand:SF 0 "register_operand" "=f")
! (unspec:SF [(match_operand:SF 2 "register_operand" "0")
! (match_operand:SF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_scratch:SF 3 "=1"))]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
"fpatan"
***************
*** 15669,15679 ****
})
(define_insn "atan2xf3_1"
! [(parallel [(set (match_operand:XF 0 "register_operand" "=f")
! (unspec:XF [(match_operand:XF 2 "register_operand" "0")
! (match_operand:XF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && ! TARGET_128BIT_LONG_DOUBLE"
"fpatan"
--- 15669,15679 ----
})
(define_insn "atan2xf3_1"
! [(set (match_operand:XF 0 "register_operand" "=f")
! (unspec:XF [(match_operand:XF 2 "register_operand" "0")
! (match_operand:XF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_scratch:XF 3 "=1"))]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && ! TARGET_128BIT_LONG_DOUBLE"
"fpatan"
***************
*** 15694,15704 ****
})
(define_insn "atan2tf3_1"
! [(parallel [(set (match_operand:TF 0 "register_operand" "=f")
! (unspec:TF [(match_operand:TF 2 "register_operand" "0")
! (match_operand:TF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
"fpatan"
--- 15694,15704 ----
})
(define_insn "atan2tf3_1"
! [(set (match_operand:TF 0 "register_operand" "=f")
! (unspec:TF [(match_operand:TF 2 "register_operand" "0")
! (match_operand:TF 1 "register_operand" "u")]
! UNSPEC_FPATAN))
! (clobber (match_scratch:TF 3 "=1"))]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
"fpatan"
***************
*** 15719,15729 ****
})
(define_insn "*fyl2x_sfxf3"
! [(parallel [(set (match_operand:SF 0 "register_operand" "=f")
! (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)"
--- 15719,15729 ----
})
(define_insn "*fyl2x_sfxf3"
! [(set (match_operand:SF 0 "register_operand" "=f")
! (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)"
***************
*** 15732,15742 ****
(set_attr "mode" "SF")])
(define_insn "*fyl2x_dfxf3"
! [(parallel [(set (match_operand:DF 0 "register_operand" "=f")
! (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)"
--- 15732,15742 ----
(set_attr "mode" "SF")])
(define_insn "*fyl2x_dfxf3"
! [(set (match_operand:DF 0 "register_operand" "=f")
! (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)"
***************
*** 15745,15755 ****
(set_attr "mode" "DF")])
(define_insn "*fyl2x_xf3"
! [(parallel [(set (match_operand:XF 0 "register_operand" "=f")
! (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"
--- 15745,15755 ----
(set_attr "mode" "DF")])
(define_insn "*fyl2x_xf3"
! [(set (match_operand:XF 0 "register_operand" "=f")
! (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"
***************
*** 15757,15767 ****
(set_attr "mode" "XF")])
(define_insn "*fyl2x_tfxf3"
! [(parallel [(set (match_operand:TF 0 "register_operand" "=f")
! (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"
--- 15757,15767 ----
(set_attr "mode" "XF")])
(define_insn "*fyl2x_tfxf3"
! [(set (match_operand:TF 0 "register_operand" "=f")
! (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"
{
***************
*** 15829,15839 ****
})
(define_insn "*fscale_sfxf3"
! [(parallel [(set (match_operand:SF 0 "register_operand" "=f")
! (unspec:SF [(match_operand 2 "register_operand" "0")
! (match_operand 1 "register_operand" "u")]
UNSPEC_FSCALE))
! (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)
--- 15829,15839 ----
})
(define_insn "*fscale_sfxf3"
! [(set (match_operand:SF 0 "register_operand" "=f")
! (unspec:SF [(match_operand 2 "register_operand" "0")
! (match_operand 1 "register_operand" "u")]
UNSPEC_FSCALE))
! (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)
***************
*** 15843,15853 ****
(set_attr "mode" "SF")])
(define_insn "*fscale_dfxf3"
! [(parallel [(set (match_operand:DF 0 "register_operand" "=f")
! (unspec:DF [(match_operand 2 "register_operand" "0")
! (match_operand 1 "register_operand" "u")]
UNSPEC_FSCALE))
! (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)
--- 15843,15853 ----
(set_attr "mode" "SF")])
(define_insn "*fscale_dfxf3"
! [(set (match_operand:DF 0 "register_operand" "=f")
! (unspec:DF [(match_operand 2 "register_operand" "0")
! (match_operand 1 "register_operand" "u")]
UNSPEC_FSCALE))
! (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)
***************
*** 15857,15867 ****
(set_attr "mode" "DF")])
(define_insn "*fscale_xf3"
! [(parallel [(set (match_operand:XF 0 "register_operand" "=f")
! (unspec:XF [(match_operand:XF 2 "register_operand" "0")
! (match_operand:XF 1 "register_operand" "u")]
! UNSPEC_FSCALE))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
"fscale\;fstp\t%y1"
--- 15857,15867 ----
(set_attr "mode" "DF")])
(define_insn "*fscale_xf3"
! [(set (match_operand:XF 0 "register_operand" "=f")
! (unspec:XF [(match_operand:XF 2 "register_operand" "0")
! (match_operand:XF 1 "register_operand" "u")]
! UNSPEC_FSCALE))
! (clobber (match_scratch:XF 3 "=1"))]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
"fscale\;fstp\t%y1"
***************
*** 15869,15879 ****
(set_attr "mode" "XF")])
(define_insn "*fscale_tf3"
! [(parallel [(set (match_operand:TF 0 "register_operand" "=f")
! (unspec:TF [(match_operand:TF 2 "register_operand" "0")
! (match_operand:TF 1 "register_operand" "u")]
! UNSPEC_FSCALE))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
"fscale\;fstp\t%y1"
--- 15869,15879 ----
(set_attr "mode" "XF")])
(define_insn "*fscale_tf3"
! [(set (match_operand:TF 0 "register_operand" "=f")
! (unspec:TF [(match_operand:TF 2 "register_operand" "0")
! (match_operand:TF 1 "register_operand" "u")]
! UNSPEC_FSCALE))
! (clobber (match_scratch:TF 3 "=1"))]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
"fscale\;fstp\t%y1"
***************
*** 15930,15936 ****
(set (match_dup 9) (plus:XF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:SF 0 "register_operand" "")
(unspec:SF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_dup 5))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
{
--- 15930,15936 ----
(set (match_dup 9) (plus:XF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:SF 0 "register_operand" "")
(unspec:SF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_scratch:SF 5 ""))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
{
***************
*** 15960,15966 ****
(set (match_dup 9) (plus:TF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:SF 0 "register_operand" "")
(unspec:SF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_dup 5))])]
""
{
rtx temp;
--- 15960,15966 ----
(set (match_dup 9) (plus:TF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:SF 0 "register_operand" "")
(unspec:SF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_scratch:SF 5 ""))])]
""
{
rtx temp;
***************
*** 15983,15989 ****
(set (match_dup 9) (plus:XF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:DF 0 "register_operand" "")
(unspec:DF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_dup 5))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
{
--- 15983,15989 ----
(set (match_dup 9) (plus:XF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:DF 0 "register_operand" "")
(unspec:DF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_scratch:DF 5 ""))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
{
***************
*** 16014,16020 ****
(set (match_dup 9) (plus:TF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:DF 0 "register_operand" "")
(unspec:DF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_dup 5))])]
""
{
rtx temp;
--- 16014,16020 ----
(set (match_dup 9) (plus:TF (match_dup 7) (match_dup 8)))
(parallel [(set (match_operand:DF 0 "register_operand" "")
(unspec:DF [(match_dup 9) (match_dup 5)] UNSPEC_FSCALE))
! (clobber (match_scratch:DF 5 ""))])]
""
{
rtx temp;
***************
*** 16036,16042 ****
(set (match_dup 8) (plus:XF (match_dup 6) (match_dup 7)))
(parallel [(set (match_operand:XF 0 "register_operand" "")
(unspec:XF [(match_dup 8) (match_dup 4)] UNSPEC_FSCALE))
! (clobber (match_dup 4))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
{
--- 16036,16042 ----
(set (match_dup 8) (plus:XF (match_dup 6) (match_dup 7)))
(parallel [(set (match_operand:XF 0 "register_operand" "")
(unspec:XF [(match_dup 8) (match_dup 4)] UNSPEC_FSCALE))
! (clobber (match_scratch:XF 5 ""))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
{
***************
*** 16072,16078 ****
(set (match_dup 8) (plus:TF (match_dup 6) (match_dup 7)))
(parallel [(set (match_operand:TF 0 "register_operand" "")
(unspec:TF [(match_dup 8) (match_dup 4)] UNSPEC_FSCALE))
! (clobber (match_dup 4))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
{
--- 16072,16078 ----
(set (match_dup 8) (plus:TF (match_dup 6) (match_dup 7)))
(parallel [(set (match_operand:TF 0 "register_operand" "")
(unspec:TF [(match_dup 8) (match_dup 4)] UNSPEC_FSCALE))
! (clobber (match_scratch:TF 5 ""))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
{
***************
*** 16091,16097 ****
(unspec:DF [(match_dup 2)
(match_operand:DF 1 "register_operand" "")]
UNSPEC_FPATAN))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
{
--- 16091,16097 ----
(unspec:DF [(match_dup 2)
(match_operand:DF 1 "register_operand" "")]
UNSPEC_FPATAN))
! (clobber (match_scratch:DF 3 ""))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations"
{
***************
*** 16104,16110 ****
(unspec:XF [(match_dup 2)
(match_operand:XF 1 "register_operand" "")]
UNSPEC_FPATAN))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
{
--- 16104,16110 ----
(unspec:XF [(match_dup 2)
(match_operand:XF 1 "register_operand" "")]
UNSPEC_FPATAN))
! (clobber (match_scratch:XF 3 ""))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && !TARGET_128BIT_LONG_DOUBLE"
{
***************
*** 16117,16123 ****
(unspec:TF [(match_dup 2)
(match_operand:TF 1 "register_operand" "")]
UNSPEC_FPATAN))
! (clobber (match_dup 1))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
{
--- 16117,16123 ----
(unspec:TF [(match_dup 2)
(match_operand:TF 1 "register_operand" "")]
UNSPEC_FPATAN))
! (clobber (match_scratch:TF 3 ""))])]
"! TARGET_NO_FANCY_MATH_387 && TARGET_80387
&& flag_unsafe_math_optimizations && TARGET_128BIT_LONG_DOUBLE"
{
Index: config/pa/pa.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.md,v
retrieving revision 1.132
diff -c -3 -p -r1.132 pa.md
*** config/pa/pa.md 17 Oct 2003 03:32:21 -0000 1.132
--- config/pa/pa.md 18 Oct 2003 23:12:39 -0000
***************
*** 3016,3025 ****
--- 3016,3032 ----
;; therefore it is forced to operand 2. If the count is compile-time
;; determined, we need two scratch registers for the unrolled code.
(define_insn "movstrsi_internal"
+ <<<<<<< pa.md
+ [(set (mem:BLK (match_operand:SI 0 "register_operand" "r,r"))
+ (mem:BLK (match_operand:SI 1 "register_operand" "r,r")))
+ (clobber (match_scratch:SI 7 "=0,0")))
+ (clobber (match_scratch:SI 8 "=1,1"))
+ =======
[(set (mem:BLK (match_operand:SI 0 "register_operand" "r,r"))
(mem:BLK (match_operand:SI 1 "register_operand" "r,r")))
(clobber (match_scratch:SI 7 "=0,0"))
(clobber (match_scratch:SI 8 "=1,1"))
+ >>>>>>> 1.132
(clobber (match_operand:SI 2 "register_operand" "=r,r")) ;loop cnt/tmp
(clobber (match_operand:SI 3 "register_operand" "=&r,&r")) ;item tmp
(clobber (match_operand:SI 6 "register_operand" "=&r,&r")) ;item tmp2
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.349
diff -c -3 -p -r1.349 invoke.texi
*** doc/invoke.texi 18 Oct 2003 00:22:22 -0000 1.349
--- doc/invoke.texi 18 Oct 2003 23:12:40 -0000
*************** larger binaries. Very high values are n
*** 4773,4794 ****
binaries may adversely affect runtime performance.
The default value is 200.
- @item max-inline-slope
- After exceeding the maximum number of inlined instructions by repeated
- inlining, a linear function is used to decrease the allowable size
- for single functions. The slope of that function is the negative
- reciprocal of the number specified here.
- This parameter is ignored when @option{-funit-at-a-time} is used.
- The default value is 32.
-
- @item min-inline-insns
- The repeated inlining is throttled more and more by the linear function
- after exceeding the limit. To avoid too much throttling, a minimum for
- this function is specified here to allow repeated inlining for very small
- functions even when a lot of repeated inlining already has been done.
- This parameter is ignored when @option{-funit-at-a-time} is used.
- The default value is 10.
-
@item large-function-insns
The limit specifying really large functions. For functions greater than this
limit inlining is constrained by @option{--param large-function-growth}.
--- 4773,4778 ----
Index: testsuite/g++.dg/opt/inline4.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/opt/inline4.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 inline4.C
*** testsuite/g++.dg/opt/inline4.C 23 Jul 2003 16:45:15 -0000 1.2
--- testsuite/g++.dg/opt/inline4.C 18 Oct 2003 23:12:40 -0000
***************
*** 1,4 ****
! // { dg-options "-O2 -ftemplate-depth-20000 --param min-inline-insns=100 --param max-inline-insns=3" }
template <int I>
inline void g() { g<I-1>(); return; }
--- 1,4 ----
! // { dg-options "-O2 -ftemplate-depth-20000" }
template <int I>
inline void g() { g<I-1>(); return; }
Index: testsuite/gcc.dg/inline-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/inline-2.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 inline-2.c
*** testsuite/gcc.dg/inline-2.c 14 Mar 2003 17:49:12 -0000 1.4
--- testsuite/gcc.dg/inline-2.c 18 Oct 2003 23:12:42 -0000
*************** static int foo(void)
*** 11,17 ****
int bar(void)
{
! return foo() + 1;
}
/* { dg-final { scan-assembler-not "jsr" { target alpha*-*-* } } } */
--- 11,18 ----
int bar(void)
{
! /* Call twice to avoid bypassing the limit for functions called once. */
! return foo() + foo() + 1;
}
/* { dg-final { scan-assembler-not "jsr" { target alpha*-*-* } } } */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (9 preceding siblings ...)
2003-10-18 23:21 ` hubicka at ucw dot cz
@ 2003-10-19 17:26 ` rth at redhat dot com
2003-10-19 18:00 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rth at redhat dot com @ 2003-10-19 17:26 UTC (permalink / raw)
To: gcc-bugs
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 rth at redhat dot com 2003-10-19 17:23 -------
Subject: Re: [3.4 Regression] ICE when using log function with -O3 -ffast-math
Ok.
r~
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (10 preceding siblings ...)
2003-10-19 17:26 ` rth at redhat dot com
@ 2003-10-19 18:00 ` cvs-commit at gcc dot gnu dot org
2003-10-19 18:04 ` pinskia at gcc dot gnu dot org
2003-10-19 20:58 ` martin at mpa-garching dot mpg dot de
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-19 18:00 UTC (permalink / raw)
To: gcc-bugs
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 cvs-commit at gcc dot gnu dot org 2003-10-19 18:00 -------
Subject: Bug 12612
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: hubicka@gcc.gnu.org 2003-10-19 18:00:13
Modified files:
gcc : ChangeLog reg-stack.c
gcc/config/i386: i386.c i386.md
Log message:
* i386.c (print_reg): Do not abort on certain registers.
PR optimization/12612
* reg-stack.c (subst_stack_regs_pat): Use st(1) for clobbers.
* i386.md (fpatan, fyl2x, fscale patterns and expanders): Use
match_scratch; avoid bogus paralles.
PR target/12674
* i386.c (ix86_function_regparm): Disable implicit register passing
conventions when profiling.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1478&r2=2.1479
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reg-stack.c.diff?cvsroot=gcc&r1=1.134&r2=1.135
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.608&r2=1.609
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.486&r2=1.487
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (11 preceding siblings ...)
2003-10-19 18:00 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-19 18:04 ` pinskia at gcc dot gnu dot org
2003-10-19 20:58 ` martin at mpa-garching dot mpg dot de
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-19 18:04 UTC (permalink / raw)
To: gcc-bugs
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
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-19 18:04 -------
Fixed for 3.4.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
` (12 preceding siblings ...)
2003-10-19 18:04 ` pinskia at gcc dot gnu dot org
@ 2003-10-19 20:58 ` martin at mpa-garching dot mpg dot de
13 siblings, 0 replies; 15+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2003-10-19 20:58 UTC (permalink / raw)
To: gcc-bugs
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 martin at mpa-garching dot mpg dot de 2003-10-19 20:34 -------
Hi Andrew, hi Jan,
my code runs fine again; thanks for the patch!
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2003-10-19 20:34 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-14 7:51 [Bug c++/12612] New: ICE when compiling with -O3 -ffast-math martin at mpa-garching dot mpg dot de
2003-10-14 7:53 ` [Bug c++/12612] " martin at mpa-garching dot mpg dot de
2003-10-14 16:22 ` [Bug optimization/12612] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-10-17 16:38 ` [Bug optimization/12612] [3.4 Regression] ICE when using log function " reichelt at gcc dot gnu dot org
2003-10-17 17:41 ` reichelt at gcc dot gnu dot org
2003-10-17 17:41 ` pinskia at gcc dot gnu dot org
2003-10-17 18:12 ` reichelt at gcc dot gnu dot org
2003-10-17 18:13 ` hubicka at ucw dot cz
2003-10-18 18:49 ` pinskia at gcc dot gnu dot org
2003-10-18 23:17 ` hubicka at ucw dot cz
2003-10-18 23:21 ` hubicka at ucw dot cz
2003-10-19 17:26 ` rth at redhat dot com
2003-10-19 18:00 ` cvs-commit at gcc dot gnu dot org
2003-10-19 18:04 ` pinskia at gcc dot gnu dot org
2003-10-19 20:58 ` martin at mpa-garching dot mpg dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).