This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH [fsf-mainline] make andsi3_internal8 pattern set CR (ppc64)
- From: Fariborz Jahanian <fjahanian at apple dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 25 Oct 2004 11:15:06 -0700
- Subject: PATCH [fsf-mainline] make andsi3_internal8 pattern set CR (ppc64)
This patch fixes dejagnu test gcc.c-torture/execute/930718-1.c when
compiled with -O2 -mcpu=G5.
When andsi3_internal8 splitter is used, CR is not set correctly. This
patch attempts to fix this.
Patch has been bootstrapped, dejagnu tested on apple-ppc-darwin.
OK for mainline?
- fariborz (fjahanian@apple.com)
ChangeLog:
2004-10-25 Fariborz Jahanian <fjahanian@apple.com>
* config/rs6000/rs6000.md (andsi3_internal8): Set CR when
splitting
into rotlsi3.
Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.325
diff -c -p -r1.325 rs6000.md
*** rs6000.md 22 Oct 2004 19:41:58 -0000 1.325
--- rs6000.md 25 Oct 2004 17:58:31 -0000
***************
*** 2452,2459 ****
(set (match_dup 0)
(and:SI (rotate:SI (match_dup 1) (match_dup 4))
(match_dup 5)))])
! (set (match_dup 0)
! (rotate:SI (match_dup 0) (match_dup 6)))]
"
{
int mb = extract_MB (operands[2]);
--- 2452,2462 ----
(set (match_dup 0)
(and:SI (rotate:SI (match_dup 1) (match_dup 4))
(match_dup 5)))])
! (parallel [(set (match_dup 3)
! (compare:CC (rotate:SI (match_dup 0) (match_dup 6))
! (const_int 0)))
! (set (match_dup 0)
! (rotate:SI (match_dup 0) (match_dup 6)))])]
"
{
int mb = extract_MB (operands[2]);