First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 15598
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Jan Hubicka <jh@suse.cz>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: H.J. Lu <hjl.tools@gmail.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
bar.c A testcase text/plain 2004-05-23 05:09 262 bytes Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 15598 depends on: Show dependency tree
Show dependency graph
Bug 15598 blocks: 16278

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2004-05-23 13:27 Opened: 2004-05-23 05:04
-O2 -mtune=itanium causes ICE.

------- Comment #1 From H.J. Lu 2004-05-23 05:09 -------
Created an attachment (id=6363) [edit]
A testcase

make[1]: Entering directory `/export/home/hjl/bugs/gcc/itanium'
/export/build/gnu/gcc-next/build-ia64-linux/gcc/xgcc
-B/export/build/gnu/gcc-next/build-ia64-linux/gcc/ -O2 -mtune=itanium	-c -o
bar.o bar.c
bar.c: In function `ia64_handle_irq':
bar.c:20: internal compiler error: in bundling, at config/ia64/ia64.c:6715
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [bar.o] Error 1
make[1]: Leaving directory `/export/home/hjl/bugs/gcc/itanium'

This patch

http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01270.html

causes bootstrap failure on many platforms, including Linux/ia64. But gcc
passes this testcase. This patch

http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01451.html

may fix the bootstrap problem. But gcc fails the testcase.

------- Comment #2 From Andrew Pinski 2004-05-23 11:33 -------
Are you sure that not caused by a modified 3.4.1? As on line 6715 in ia64.c
there is no abort.

------- Comment #3 From Andreas Schwab 2004-05-23 13:27 -------
I can reproduce with today's 3.4 branch. 
 
bar.c:20: internal compiler error: in bundling, at config/ia64/ia64.c:6902 
 

------- Comment #4 From H.J. Lu 2004-05-23 15:12 -------
The difference of the cgraph RTL dump between bad and good ones are

+Final callgraph:
+
+ia64_handle_irq: 27 insns needed inlinable
+  called by:
+  calls: do_IRQ
+do_IRQ:
+  called by: ia64_handle_irq
+  calls:

The bad one is missing "Final callgraph".

------- Comment #5 From H.J. Lu 2004-05-23 15:17 -------
The bad one died before final call graph could be dumped.

------- Comment #6 From Jim Wilson 2004-06-01 06:04 -------
I don't understand this code well enough to easily debug it, and I am leaving
for the gcc summit tomorrow.

However, I did notice that if I delete the volatile from the first asm, then it
works.  Also, it works if I use -mvolatile-asm-stop.  Since that option adds
extra unnecessary stop bits, it should be an acceptable work around in the short
term.

I also noticed that the same workarounds worked for the testcase in 15653.  I
didn't try the testcase in 15655.

------- Comment #7 From H.J. Lu 2004-06-02 20:24 -------
If I use the patch below, this testcase will pass, but not others.

2004-05-24  H.J. Lu  <hongjiu.lu@intel.com>

        * config/ia64/itanium1.md (1_ialu_addr): Also allow I-unit.
        (1b_ialu_addr): Likewise.

--- gcc/config/ia64/itanium1.md.bundle  2003-07-07 06:58:34.000000000 -0700
+++ gcc/config/ia64/itanium1.md 2004-05-25 11:26:10.563164935 -0700
@@ -580,7 +580,7 @@
          (eq (symbol_ref
               "!bundling_p && ia64_produce_address_p (insn)")
              (const_int 1)))
-    "1_M")
+    "1_A")
 (define_insn_reservation "1_icmp"    1
   (and (and (eq_attr "cpu" "itanium")
             (eq_attr "itanium_class" "icmp"))
@@ -1449,7 +1449,7 @@
          (eq (symbol_ref
               "bundling_p && ia64_produce_address_p (insn)")
              (const_int 1)))
-    "1b_M")
+    "1b_A")
 (define_insn_reservation "1b_icmp"    1
   (and (and (eq_attr "cpu" "itanium")
             (eq_attr "itanium_class" "icmp"))

------- Comment #8 From Jim Wilson 2004-06-08 07:33 -------
Subject: Re:  [3.4 Regression]: Gcc 3.4 ICE on valid code

hjl at lucon dot org wrote:
>         * config/ia64/itanium1.md (1_ialu_addr): Also allow I-unit.
>         (1b_ialu_addr): Likewise.

I do not believe this patch is correct.  I believe the 1*_ialu_addr 
patterns are deliberately using M instead of A.

Use of M instead of A restricts bundling unnecessarily, however, it 
allows us to accurately model the latency of the operation, which is 
particularly important when we have an ialu instruction that generates a 
load/store address.

Use of A would not restrict bundling, but would not let us model 
latencies accurately.  An insn can only have one latency, but the 
latency of an ialu insn varies depending on whether it gets scheduled to 
an M slot or an I slot.

Hence there is a trade off here between getting bundling right or 
getting latencies right.  The code as written gets the latecy right when 
an ialu generates a load/store address, presumably to avoid an AGI 
stall, and gets the bundling right otherwise.

------- Comment #9 From CVS Commits 2004-06-08 15:57 -------
Subject: Bug 15598

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	vmakarov@gcc.gnu.org	2004-06-08 15:56:59

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: ia64.c 

Log message:
	2004-06-08  Vladimir Makarov  <vmakarov@redhat.com>
	
	PR target/15598
	* config/ia64/ia64.c (bundling): Add missed TYPE_A.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.480&r2=2.2326.2.481
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.265.2.7&r2=1.265.2.8


------- Comment #10 From CVS Commits 2004-06-08 15:58 -------
Subject: Bug 15598

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	vmakarov@gcc.gnu.org	2004-06-08 15:58:29

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: ia64.c 

Log message:
	2004-06-08  Vladimir Makarov  <vmakarov@redhat.com>
	
	PR target/15598
	* config/ia64/ia64.c (bundling): Add missed TYPE_A.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3873&r2=2.3874
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.c.diff?cvsroot=gcc&r1=1.287&r2=1.288


------- Comment #11 From Andrew Pinski 2004-06-08 18:00 -------
Fixed.

First Last Prev Next    No search results available      Search page      Enter new bug