public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/33151] New: Invalid insn with pre_inc
@ 2007-08-22 22:27 pthaugen at gcc dot gnu dot org
2007-08-22 22:32 ` [Bug target/33151] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: pthaugen at gcc dot gnu dot org @ 2007-08-22 22:27 UTC (permalink / raw)
To: gcc-bugs
I'm hitting the following on 6 SPEC CPU2006 benchmarks, some with pre_inc
others with pre_modify.
run/build_base_gcc411-base.0001> cat junk.c
extern double cos (double x);
extern double sin (double x);
double
pre_inc_ice (int n)
{
int i;
double sc, ss, arg;
sc = ss = 0.0;
for (i = 0; i < n; i++)
{
arg = 1.0 / n;
sc += cos (arg);
ss += sin (arg);
}
return sc + ss;
}
run/build_base_gcc411-base.0001> /opt/biarch/gcc433-xlc-perf-2/bin/gcc -S -m32
-O2 junk.c
junk.c: In function 'pre_inc_ice':
junk.c:18: error: unrecognizable insn:
(insn 84 80 85 4 junk.c:11 (set (reg/f:SI 155)
(pre_inc:SI (reg/f:SI 139))) -1 (expr_list:REG_INC (reg/f:SI 139)
(nil)))
junk.c:18: internal compiler error: in extract_insn, at recog.c:1990
Please submit a full bug report,
with preprocessed source if appropriate.
--
Summary: Invalid insn with pre_inc
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pthaugen at gcc dot gnu dot org
GCC build triplet: powerpc64-linux
GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
@ 2007-08-22 22:32 ` pinskia at gcc dot gnu dot org
2007-08-22 22:40 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-22 22:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-22 22:32 -------
The splitting of:
(insn 22 80 24 4 t.c:11 (parallel [
(set (reg:DF 123 [ pretmp.23 ])
(float:DF (reg/v:SI 128 [ n ])))
(use (reg:SI 132))
(use (reg:DF 133))
(clobber (mem/c/i:DF (pre_inc:SI (reg/f:SI 139)) [2 S8 A64]))
(clobber (reg:DF 137))
(clobber (reg:SI 138))
]) 244 {*floatsidf2_internal} (expr_list:REG_DEAD (reg:DF 133)
(expr_list:REG_DEAD (reg:SI 132)
(expr_list:REG_UNUSED (reg:SI 138)
(expr_list:REG_UNUSED (reg:DF 137)
(expr_list:REG_INC (reg/f:SI 139)
(expr_list:REG_EQUAL (float:DF (reg/v:SI 128 [ n ]))
(nil))))))))
Causes the invalid pre_inc.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Component|rtl-optimization |target
Ever Confirmed|0 |1
GCC build triplet|powerpc64-linux |
GCC host triplet|powerpc64-linux |
GCC target triplet|powerpc64-linux |powerpc-linux-gnu
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2007-08-22 22:32:28
date| |
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
2007-08-22 22:32 ` [Bug target/33151] " pinskia at gcc dot gnu dot org
@ 2007-08-22 22:40 ` pinskia at gcc dot gnu dot org
2007-08-22 22:41 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-22 22:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-08-22 22:39 -------
What the auto pre-increment pass is doing looks ok from the point of view of
correct RTL.
Before:
(insn 22 21 70 4 t.c:11 (parallel [
(set (reg:DF 123 [ pretmp.23 ])
(float:DF (reg/v:SI 128 [ n ])))
(use (reg:SI 132))
(use (reg:DF 133))
(clobber (mem/c/i:DF (plus:SI (reg/f:SI 113 sfp)
(const_int 8 [0x8])) [2 S8 A64]))
(clobber (reg:DF 137))
(clobber (reg:SI 138))
]) 244 {*floatsidf2_internal} (expr_list:REG_DEAD (reg:DF 133)
(expr_list:REG_DEAD (reg:SI 132)
(expr_list:REG_UNUSED (reg:SI 138)
(expr_list:REG_UNUSED (reg:DF 137)
(expr_list:REG_EQUAL (float:DF (reg/v:SI 128 [ n ]))
(nil)))))))
(insn 70 22 24 4 t.c:6 (set (reg/f:SI 139)
(plus:SI (reg/f:SI 113 sfp)
(const_int 8 [0x8]))) 79 {*addsi3_internal1} (nil))
After:
(insn 80 21 22 4 t.c:11 (set (reg/f:SI 139)
(reg/f:SI 113 sfp)) -1 (nil))
(insn 22 80 24 4 t.c:11 (parallel [
(set (reg:DF 123 [ pretmp.23 ])
(float:DF (reg/v:SI 128 [ n ])))
(use (reg:SI 132))
(use (reg:DF 133))
(clobber (mem/c/i:DF (pre_inc:SI (reg/f:SI 139)) [2 S8 A64]))
(clobber (reg:DF 137))
(clobber (reg:SI 138))
]) 244 {*floatsidf2_internal} (expr_list:REG_INC (reg/f:SI 139)
(expr_list:REG_DEAD (reg:DF 133)
(expr_list:REG_DEAD (reg:SI 132)
(expr_list:REG_UNUSED (reg:SI 138)
(expr_list:REG_UNUSED (reg:DF 137)
(expr_list:REG_EQUAL (float:DF (reg/v:SI 128 [ n ]))
(nil))))))))
The semantics have not changed but we get an pre_inc inside the clobber now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
2007-08-22 22:32 ` [Bug target/33151] " pinskia at gcc dot gnu dot org
2007-08-22 22:40 ` pinskia at gcc dot gnu dot org
@ 2007-08-22 22:41 ` pinskia at gcc dot gnu dot org
2007-08-23 18:59 ` zadeck at naturalbridge dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-22 22:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-08-22 22:41 -------
I think we need a new predicate for this rtl instruction, currently we just
have:
(clobber (match_operand:DF 4 "memory_operand" "=o"))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-08-22 22:41 ` pinskia at gcc dot gnu dot org
@ 2007-08-23 18:59 ` zadeck at naturalbridge dot com
2007-08-24 20:39 ` dje at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: zadeck at naturalbridge dot com @ 2007-08-23 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from zadeck at naturalbridge dot com 2007-08-23 18:59 -------
Subject: Re: Invalid insn with pre_inc
pinskia at gcc dot gnu dot org wrote:
> ------- Comment #3 from pinskia at gcc dot gnu dot org 2007-08-22 22:41 -------
> I think we need a new predicate for this rtl instruction, currently we just
> have:
> (clobber (match_operand:DF 4 "memory_operand" "=o"))
>
>
>
After thinking about this last night, i believe that this problem should
be solved at the machine description level, not by changing
auto-inc-dec.c. Auto-inc-dec.c uses all of the standard interfaces to
keep from generating invalid rtl. So it seems proper to have the md
level not allow the creation of this insn.
Kenny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-08-23 18:59 ` zadeck at naturalbridge dot com
@ 2007-08-24 20:39 ` dje at gcc dot gnu dot org
2007-08-24 20:44 ` dje at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2007-08-24 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dje at gcc dot gnu dot org 2007-08-24 20:39 -------
Created an attachment (id=14109)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14109&action=view)
offsettable_mem_operand
This patch seems to fix the testcase for me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-08-24 20:39 ` dje at gcc dot gnu dot org
@ 2007-08-24 20:44 ` dje at gcc dot gnu dot org
2007-08-26 2:21 ` dje at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2007-08-24 20:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dje at gcc dot gnu dot org 2007-08-24 20:44 -------
Created an attachment (id=14110)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14110&action=view)
offsettable_mem_operand
Fix corrupted patch
--
dje at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #14109|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-08-24 20:44 ` dje at gcc dot gnu dot org
@ 2007-08-26 2:21 ` dje at gcc dot gnu dot org
2007-08-26 16:33 ` dje at gcc dot gnu dot org
2007-08-30 21:09 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2007-08-26 2:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dje at gcc dot gnu dot org 2007-08-26 02:21 -------
Created an attachment (id=14117)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14117&action=view)
offsettable_mem_operand
v3
--
dje at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #14110|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-08-26 2:21 ` dje at gcc dot gnu dot org
@ 2007-08-26 16:33 ` dje at gcc dot gnu dot org
2007-08-30 21:09 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2007-08-26 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from dje at gcc dot gnu dot org 2007-08-26 16:32 -------
Subject: Bug 33151
Author: dje
Date: Sun Aug 26 16:32:40 2007
New Revision: 127807
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127807
Log:
PR target/33151
* config/rs6000/predicates.md (offsettable_mem_operand): Memory
operand without auto-inc-dec.
* config/rs6000/rs6000.md (floatsidf2_internal): Use
offsettable_mem_operand.
(floatunssidf2_internal): Same.
(fix_truncdfsi2_internal): Same.
(floatsidf_ppc64): Same.
(floatunssidf_ppc64): Same.
(fix_trunctfsi2_internal): Same.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/predicates.md
trunk/gcc/config/rs6000/rs6000.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/33151] Invalid insn with pre_inc
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-08-26 16:33 ` dje at gcc dot gnu dot org
@ 2007-08-30 21:09 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-30 21:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2007-08-30 21:09 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33151
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-08-30 21:09 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-22 22:27 [Bug rtl-optimization/33151] New: Invalid insn with pre_inc pthaugen at gcc dot gnu dot org
2007-08-22 22:32 ` [Bug target/33151] " pinskia at gcc dot gnu dot org
2007-08-22 22:40 ` pinskia at gcc dot gnu dot org
2007-08-22 22:41 ` pinskia at gcc dot gnu dot org
2007-08-23 18:59 ` zadeck at naturalbridge dot com
2007-08-24 20:39 ` dje at gcc dot gnu dot org
2007-08-24 20:44 ` dje at gcc dot gnu dot org
2007-08-26 2:21 ` dje at gcc dot gnu dot org
2007-08-26 16:33 ` dje at gcc dot gnu dot org
2007-08-30 21:09 ` pinskia at gcc dot gnu dot org
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).