Bug 19147 - invalid rlwinm patterns
Summary: invalid rlwinm patterns
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 3.3.6
Assignee: Alan Modra
URL:
Keywords: patch, wrong-code
Depends on:
Blocks:
 
Reported: 2004-12-24 06:25 UTC by Alan Modra
Modified: 2004-12-24 23:22 UTC (History)
1 user (show)

See Also:
Host:
Target: powerpc64-*-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-12-24 14:38:41


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Modra 2004-12-24 06:25:52 UTC
andsi3_internal7 and andsi3_internal8 generate invalid LT and GT condition
codes.  This is because these bits of the condition register are set from
all 64 bits of the register in 64-bit mode.  I don't believe it is possible
to have all of EQ, LT and GT correct using only two rlwinm instructions in
the mask_operand_wrap case.

Causes failure of gcc.c-torture/execute/930718-1.c
Comment 1 Andrew Pinski 2004-12-24 14:38:41 UTC
Patch here: < http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01892.html>.
Comment 2 GCC Commits 2004-12-24 23:00:30 UTC
Subject: Bug 19147

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amodra@gcc.gnu.org	2004-12-24 23:00:10

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

Log message:
	PR target/19147
	* config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6952&r2=2.6953
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.337&r2=1.338

Comment 3 GCC Commits 2004-12-24 23:14:50 UTC
Subject: Bug 19147

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	amodra@gcc.gnu.org	2004-12-24 23:14:38

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

Log message:
	PR target/19147
	* config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete.

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.753&r2=2.2326.2.754
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.284.4.14&r2=1.284.4.15

Comment 4 GCC Commits 2004-12-24 23:17:29 UTC
Subject: Bug 19147

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	amodra@gcc.gnu.org	2004-12-24 23:17:14

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

Log message:
	PR target/19147
	* config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.1044&r2=1.16114.2.1045
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.224.2.6&r2=1.224.2.7

Comment 5 Alan Modra 2004-12-24 23:22:28 UTC
Fixed all active branches
Comment 6 GCC Commits 2005-01-26 23:22:32 UTC
Subject: Bug 19147

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	apple-ppc-branch
Changes by:	dalej@gcc.gnu.org	2005-01-26 23:22:14

Modified files:
	gcc            : ChangeLog.apple-ppc 
	gcc/config/rs6000: rs6000.md darwin-tramp.asm 

Log message:
	2005-01-25  Dale Johannesen  <dalej@apple.com>
	
	Radar 3941199
	* config/rs6000/darwin-tramp.asm (__trampoline_setup):
	Make work for 64 bit.
	
	2005-01-25  Dale Johannesen  <dalej@apple.com>
	
	Radar 3944688
	PR 19147
	* config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8):  Delete.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.apple-ppc.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.285&r2=1.1.2.286
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.190.2.41.2.25&r2=1.190.2.41.2.26
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/darwin-tramp.asm.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.2.14.1.8.5&r2=1.2.14.1.8.6