🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2473

MINUS vs. COMPARE in loop.c

#2473
From: Matthew Self
Date: Mon, 27 Mar 1989 20:47
26 lines
1471 bytes
  I looked through loop.c for MINUS's where COMPARE's should be, and I
found one place where it should be fixed.  It couldn't have caused
your problem since this code recognizes comparisons; it doesn't
generate them.  All the same, here is the diff.

  --Matthew

*** loop.c	Thu Mar 23 22:21:03 1989
--- loop.c.cmp	Mon Mar 27 12:37:54 1989
***************
*** 4352,4356 ****
  	  if (GET_CODE (SET_SRC (PATTERN (p))) == REG)
  	    tested_before_loop = SET_SRC (PATTERN (p));
! 	  else if (GET_CODE (SET_SRC (PATTERN (p))) == MINUS
  		   && GET_CODE (XEXP (SET_SRC (PATTERN (p)), 1)) == REG
  		   && XEXP (SET_SRC (PATTERN (p)), 1) == const0_rtx)
--- 4352,4356 ----
  	  if (GET_CODE (SET_SRC (PATTERN (p))) == REG)
  	    tested_before_loop = SET_SRC (PATTERN (p));
! 	  else if (GET_CODE (SET_SRC (PATTERN (p))) == COMPARE
  		   && GET_CODE (XEXP (SET_SRC (PATTERN (p)), 1)) == REG
  		   && XEXP (SET_SRC (PATTERN (p)), 1) == const0_rtx)

P.S. Oughtn't the second to last line above have a 0 rather than a 1?
const0_rtx doesn't have code REG....
Technical Details
Message-ID: <8903272047.AA04732@bayes.arc.nasa.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BAYES.ARC.NASA.GOV!self

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BAYES.ARC.NASA.GOV!self
From: self@BAYES.ARC.NASA.GOV (Matthew Self)
Newsgroups: gnu.gcc.bug
Subject: MINUS vs. COMPARE in loop.c
Message-ID: <8903272047.AA04732@bayes.arc.nasa.gov>
Date: 27 Mar 89 20:47:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 26