Major i386 testsuite regressions on trunk

Jan Hubicka jh@suse.cz
Wed Jun 5 07:00:00 GMT 2002


> Jan Hubicka writes:
> 
> > This is interesting.  All these tests passes for me and majority of the
> > code in patch you point out os not executed yet (it will be once STC
> > patch is ready for merging).  What error messages are you seeing?
> 
> Judging from the various testsuite results, this seems to happen only for
> the i386 configurations, not e.g. i686.

Yes, that is the case, thanks!
The problem is that GCC played ping-pong with test instruction.  It
first decided to turn 32bit test to 8bit test in my new code and then
decoded to turn back as it is instructed to promote all 8bit
computations to 32bit.  I think we need to be more selective on what to
promote.  This should result in better code too.

Wed Jun  5 15:57:51 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* i386.md (and promiting splitters): Disable QI to SImode promoting
	when doing so changes immediate to be 32bit.
Index: i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.369
diff -c -3 -p -r1.369 i386.md
*** i386.md	29 May 2002 20:54:00 -0000	1.369
--- i386.md	5 Jun 2002 13:57:44 -0000
***************
*** 16358,16363 ****
--- 16358,16365 ----
     && ix86_match_ccmode (insn, CCNOmode)
     && (GET_MODE (operands[0]) == HImode
         || (GET_MODE (operands[0]) == QImode 
+ 	   /* Ensure that the operand will remain sign extended immedaite.  */
+ 	   && INTVAL (operands[2]) >= 0
  	   && (TARGET_PROMOTE_QImode || optimize_size)))"
    [(parallel [(set (reg:CCNO 17)
  		   (compare:CCNO (and:SI (match_dup 1) (match_dup 2))
***************
*** 16371,16386 ****
     operands[0] = gen_lowpart (SImode, operands[0]);
     operands[1] = gen_lowpart (SImode, operands[1]);")
  
  (define_split
    [(set (reg 17)
! 	(compare (and (match_operand 0 "aligned_operand" "")
! 		      (match_operand 1 "const_int_operand" ""))
  		 (const_int 0)))]
    "! TARGET_PARTIAL_REG_STALL && reload_completed
     && ix86_match_ccmode (insn, CCNOmode)
!    && (GET_MODE (operands[0]) == HImode
!        || (GET_MODE (operands[0]) == QImode 
! 	   && (TARGET_PROMOTE_QImode || optimize_size)))"
    [(set (reg:CCNO 17)
  	(compare:CCNO (and:SI (match_dup 0) (match_dup 1))
  		      (const_int 0)))]
--- 16373,16389 ----
     operands[0] = gen_lowpart (SImode, operands[0]);
     operands[1] = gen_lowpart (SImode, operands[1]);")
  
+ ; Don't promote the QImode tests, as i386 don't have encoding of
+ ; the test instruction with 32bit sign extended immediate and thus
+ ; the code grows.
  (define_split
    [(set (reg 17)
! 	(compare (and (match_operand:HI 0 "aligned_operand" "")
! 		      (match_operand:HI 1 "const_int_operand" ""))
  		 (const_int 0)))]
    "! TARGET_PARTIAL_REG_STALL && reload_completed
     && ix86_match_ccmode (insn, CCNOmode)
!    && GET_MODE (operands[0]) == HImode"
    [(set (reg:CCNO 17)
  	(compare:CCNO (and:SI (match_dup 0) (match_dup 1))
  		      (const_int 0)))]



More information about the Gcc-bugs mailing list