public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/14478] New: rs6000 geu patterns generate incorrect code
@ 2004-03-08 10:00 amodra at bigpond dot net dot au
  2004-03-08 10:01 ` [Bug target/14478] " amodra at bigpond dot net dot au
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-08 10:00 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following with -O results in a function that always returns zero,
instead of one that always returns 1.

int foo (int a, unsigned int x)
{
  unsigned int n = 0;

  while (a)
    x = x + 1, a = a << 1;

  return x >= n;
}

-- 
           Summary: rs6000 geu patterns generate incorrect code
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amodra at bigpond dot net dot au
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] rs6000 geu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
@ 2004-03-08 10:01 ` amodra at bigpond dot net dot au
  2004-03-08 13:18 ` [Bug target/14478] rs6000 geu/ltu " amodra at bigpond dot net dot au
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-08 10:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-03-08 10:01 -------
Fixing

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amodra at bigpond dot net
                   |dot org                     |dot au
             Status|UNCONFIRMED                 |ASSIGNED
      Known to fail|                            |3.3.3 3.4.0 3.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
  2004-03-08 10:01 ` [Bug target/14478] " amodra at bigpond dot net dot au
@ 2004-03-08 13:18 ` amodra at bigpond dot net dot au
  2004-03-09  3:41 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-08 13:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-03-08 13:18 -------
Patch here: http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00696.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
            Summary|rs6000 geu patterns generate|rs6000 geu/ltu patterns
                   |incorrect code              |generate incorrect code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
  2004-03-08 10:01 ` [Bug target/14478] " amodra at bigpond dot net dot au
  2004-03-08 13:18 ` [Bug target/14478] rs6000 geu/ltu " amodra at bigpond dot net dot au
@ 2004-03-09  3:41 ` pinskia at gcc dot gnu dot org
  2004-03-09  4:10 ` amodra at bigpond dot net dot au
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-09  3:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-09 03:41 -------
This is fixed on the tree-ssa because of constant propagation.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |tree-ssa


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (2 preceding siblings ...)
  2004-03-09  3:41 ` pinskia at gcc dot gnu dot org
@ 2004-03-09  4:10 ` amodra at bigpond dot net dot au
  2004-03-09  4:15 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-09  4:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-03-09 04:10 -------
Could you perhaps tickle the bug on tree-ssa with a different testcase?

Note that on mainline, the problem insns are generated by combine.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (3 preceding siblings ...)
  2004-03-09  4:10 ` amodra at bigpond dot net dot au
@ 2004-03-09  4:15 ` pinskia at gcc dot gnu dot org
  2004-03-09 13:39 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-09  4:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-09 04:15 -------
You almost cannot as it will constant fold "unsigned >= 0" always before even getting to the RTL.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (4 preceding siblings ...)
  2004-03-09  4:15 ` pinskia at gcc dot gnu dot org
@ 2004-03-09 13:39 ` cvs-commit at gcc dot gnu dot org
  2004-05-16 19:48 ` [Bug target/14478] [3.4 only] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-09 13:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-09 13:39 -------
Subject: Bug 14478

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	hammer-3_3-branch
Changes by:	amodra@gcc.gnu.org	2004-03-09 13:39:41

Modified files:
	gcc            : ChangeLog.hammer 
	gcc/config/rs6000: rs6000.md 

Log message:
	PR target/14478
	* config/rs6000/rs6000.md: Give all reg_or_neg_short_operand
	constraints a zero alternative.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.hammer.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.1.2.371&r2=1.1.2.372
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.221.4.16&r2=1.221.4.17



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] [3.4 only] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (5 preceding siblings ...)
  2004-03-09 13:39 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-16 19:48 ` pinskia at gcc dot gnu dot org
  2004-05-26 19:07 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-16 19:48 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.3.3 3.4.0 3.5.0           |3.3.3 3.4.0
      Known to work|tree-ssa                    |tree-ssa 3.5.0
            Summary|rs6000 geu/ltu patterns     |[3.4 only] rs6000 geu/ltu
                   |generate incorrect code     |patterns generate incorrect
                   |                            |code
   Target Milestone|---                         |3.4.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] [3.4 only] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (6 preceding siblings ...)
  2004-05-16 19:48 ` [Bug target/14478] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2004-05-26 19:07 ` pinskia at gcc dot gnu dot org
  2004-05-27 18:23 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-26 19:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-26 12:29 -------
Newest patch to reject the RTL patterns from being made in the first place: <http://gcc.gnu.org/ml/
gcc-patches/2004-05/msg01669.html>

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] [3.4 only] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (7 preceding siblings ...)
  2004-05-26 19:07 ` pinskia at gcc dot gnu dot org
@ 2004-05-27 18:23 ` cvs-commit at gcc dot gnu dot org
  2004-05-27 18:32 ` cvs-commit at gcc dot gnu dot org
  2004-05-27 18:33 ` [Bug target/14478] [3.3 " amodra at bigpond dot net dot au
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-27 18:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-27 07:42 -------
Subject: Bug 14478

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amodra@gcc.gnu.org	2004-05-27 07:41:53

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

Log message:
	PR target/14478
	* config/rs6000/rs6000.c (reg_or_neg_short_operand): Don't allow zero.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3760&r2=2.3761
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.645&r2=1.646



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] [3.4 only] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (8 preceding siblings ...)
  2004-05-27 18:23 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-27 18:32 ` cvs-commit at gcc dot gnu dot org
  2004-05-27 18:33 ` [Bug target/14478] [3.3 " amodra at bigpond dot net dot au
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-27 18:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-27 07:42 -------
Subject: Bug 14478

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	amodra@gcc.gnu.org	2004-05-27 07:42:29

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

Log message:
	PR target/14478
	* config/rs6000/rs6000.c (reg_or_neg_short_operand): Don't allow zero.

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.450&r2=2.2326.2.451
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.576.2.19&r2=1.576.2.20



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/14478] [3.3 only] rs6000 geu/ltu patterns generate incorrect code
  2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
                   ` (9 preceding siblings ...)
  2004-05-27 18:32 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-27 18:33 ` amodra at bigpond dot net dot au
  10 siblings, 0 replies; 12+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-05-27 18:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-05-27 07:45 -------
Fixed on 3.4 and head.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|tree-ssa 3.5.0              |tree-ssa 3.5.0 3.4.1
         Resolution|                            |FIXED
            Summary|[3.4 only] rs6000 geu/ltu   |[3.3 only] rs6000 geu/ltu
                   |patterns generate incorrect |patterns generate incorrect
                   |code                        |code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-05-27  7:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-08 10:00 [Bug target/14478] New: rs6000 geu patterns generate incorrect code amodra at bigpond dot net dot au
2004-03-08 10:01 ` [Bug target/14478] " amodra at bigpond dot net dot au
2004-03-08 13:18 ` [Bug target/14478] rs6000 geu/ltu " amodra at bigpond dot net dot au
2004-03-09  3:41 ` pinskia at gcc dot gnu dot org
2004-03-09  4:10 ` amodra at bigpond dot net dot au
2004-03-09  4:15 ` pinskia at gcc dot gnu dot org
2004-03-09 13:39 ` cvs-commit at gcc dot gnu dot org
2004-05-16 19:48 ` [Bug target/14478] [3.4 only] " pinskia at gcc dot gnu dot org
2004-05-26 19:07 ` pinskia at gcc dot gnu dot org
2004-05-27 18:23 ` cvs-commit at gcc dot gnu dot org
2004-05-27 18:32 ` cvs-commit at gcc dot gnu dot org
2004-05-27 18:33 ` [Bug target/14478] [3.3 " amodra at bigpond dot net dot au

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).