Bug 15921 - [4.0 Regression] gcc.c-torture/compile/920501-4.c fails on powerpc-*
Summary: [4.0 Regression] gcc.c-torture/compile/920501-4.c fails on powerpc-*
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Vladimir Makarov
URL:
Keywords: ice-on-valid-code, patch
Depends on:
Blocks:
 
Reported: 2004-06-10 22:58 UTC by Andrew Pinski
Modified: 2004-09-13 14:15 UTC (History)
3 users (show)

See Also:
Host:
Target: powerpc-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-06-13 22:18:18


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2004-06-10 22:58:43 UTC
/Users/regress/tbox/cvs-gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920501-4.c: In function `foo':
^M
/Users/regress/tbox/cvs-gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920501-4.c:53: error: insn 
does not satisfy its constraints:^M
(insn 171 169 173 0 (parallel [^M
            (set (reg:SI 6 r6 [186])^M
                (lshiftrt:SI (neg:SI (abs:SI (reg/v:SI 0 r0 [orig:132 m_max ] [132])))^M
                    (const_int 31 [0x1f])))^M
            (clobber (reg:SI 0 r0))^M
        ]) 419 {*ne0} (nil)^M
    (nil))^M
Could have been caused by:

+2004-05-25  Vladimir Makarov  <vmakarov@redhat.com>
+
+	* global.c (global_alloc): Call make_accurate_live_analysis.
+	(record_one_conflict): Remove dead code.
+	(mark_reg_clobber): Remove ATTRIBUTE_UNUSED for parameter data.
+	(bb_info): New structure.
+	(BB_INFO, BB_INFO_BY_INDEX): New macros.
+	(allocate_bb_info, free_bb_info, mark_reg_change,
+	calculate_local_reg_bb_info, set_up_bb_rts_numbers, rpost_cmp,
+	modify_bb_reg_pav, calculate_reg_pav,
+	make_accurate_live_analysis): New functions.



+2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
+
+	* Makefile.in (OBJS): Add rtlhooks.o.
+	(rtlanal.o): Depend on function.h.
+	(cse.o): Depend on rtlhooks-def.h.
+	(combine.o): Depend on rtlhooks-def.h.
+	(rtlhooks.o): New rule.
+	* combine.c: Include rtlhooks-def.h.
+	(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
+	num_sign_bit_copies, cached_num_sign_bit_copies,
+	num_sign_bit_copies1): Move most of the code to rtlanal.c.
+	(reg_nonzero_bits_for_combine,
+	reg_num_sign_bit_copies_for_combine): New functions holding
+	the remnants of the above.
+	(combine_rtl_hooks): New.
+	(combine_instructions): Set rtl_hooks instead of gen_lowpart.
+	* cse.c: Include rtlhooks-def.h.
+	(cse_rtl_hooks): New.
+	(cse_main): Set rtl_hooks instead of gen_lowpart.
+	* emit-rtl.c (gen_lowpart): Remove.
+	(gen_lowpart_general): Move to rtlhooks.c.
+	* rtl.h (nonzero_bits, num_sign_bit_copies,
+	struct rtl_hooks, rtl_hooks, general_rtl_hooks): New.
+	(gen_lowpart_general): Remove.
+	(gen_lowpart): Temporarily redefine as a macro.
+	* rtlanal.c: Include function.h.
+	(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
+	num_sign_bit_copies, cached_num_sign_bit_copies,
+	num_sign_bit_copies1): New, from combine.c.
+	* rtlhooks.c: New file. 
+
Comment 1 paolo.bonzini@polimi.it 2004-06-11 07:16:52 UTC
Subject: Re:  New: [3.5 Regression] gcc.c-torture/compile/920501-4.c
 fails on powerpc-*

pinskia at gcc dot gnu dot org wrote:
> /Users/regress/tbox/cvs-gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920501-4.c: In function `foo':
> ^M
> /Users/regress/tbox/cvs-gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920501-4.c:53: error: insn 
> does not satisfy its constraints:^M
> (insn 171 169 173 0 (parallel [^M
>             (set (reg:SI 6 r6 [186])^M
>                 (lshiftrt:SI (neg:SI (abs:SI (reg/v:SI 0 r0 [orig:132 m_max ] [132])))^M
>                     (const_int 31 [0x1f])))^M
>             (clobber (reg:SI 0 r0))^M
>         ]) 419 {*ne0} (nil)^M
>     (nil))^M

It seems more likely that Vladimir's patch causes it since it is post 
global register allocation (and similarly for x86's FAIL on 
gcc.c-torture/compile/950613-1.c).

Paolo

Comment 2 Andrew Pinski 2004-06-13 22:18:17 UTC
David Edelsohn analyzed it: <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00939.html>.
Comment 3 Andrew Pinski 2004-06-15 16:04:36 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01175.html>.
Comment 4 GCC Commits 2004-07-12 18:01:55 UTC
Subject: Bug 15921

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	vmakarov@gcc.gnu.org	2004-07-12 18:01:47

Modified files:
	gcc            : ChangeLog global.c Makefile.in 

Log message:
	2004-07-12 Vladimir Makarov <vmakarov@redhat.com>
	
	PR rtl-optimization/15921
	* Makefile.in (global.o): Add recog.h.
	
	* global.c (recog.h): Add the include-clause.
	(bb_info): New member earlyclobber.
	(allocate_bb_info, free_bb_info): Initialize/finish the new
	member.
	(earlyclobber_regclass, earlyclobber_regclass_length): The new
	global variables.
	(check_earlyclobber, regclass_intersect,
	mark_reg_use_for_earlyclobber, mark_reg_use_for_earlyclobber_1):
	New functions.
	(calculate_local_reg_bb_info): Calculate value of earlyclobber.
	(make_accurate_live_analysis): Modify pavin.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4483&r2=2.4484
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/global.c.diff?cvsroot=gcc&r1=1.104&r2=1.105
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.1324&r2=1.1325

Comment 5 Andrew Pinski 2004-07-12 19:25:05 UTC
Fixed.