public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Chao-ying Fu" <fu@mips.com>
To: "Dorit Naishlos" <DORIT@il.ibm.com>
Cc: <dpatel@apple.com>, <gcc-patches@gcc.gnu.org>,
	"Gerald Pfeifer" <gerald@pfeifer.com>,
	"Giovanni Bajo" <giovannibajo@libero.it>,
	"Stephens, Nigel" <nigel@mercury.mips.com>,
	"Thekkath, Radhika" <radhika@mercury.mips.com>,
	"Richard Sandiford" <rsandifo@redhat.com>,
	"Uhler, Mike" <uhler@mercury.mips.com>,
	"Jim Wilson" <wilson@specifixinc.com>
Subject: Re: [patch] extend.texi MIPS PS/3D Support
Date: Fri, 24 Sep 2004 21:35:00 -0000	[thread overview]
Message-ID: <000a01c4a27a$8c5b73d0$a914a8c0@MIPS.COM> (raw)
In-Reply-To: <OF0F269CA7.B784A9D8-ONC2256F19.002B2B3F-C2256F19.0035061C@il.ibm.com>

Hello,

After running "cvs update" and building again today, I can compile the code.
But the output assembly is wrong with
"<ANYF:loadx>    $f0,$9($2)" and "<ANYF:storex>   $f0,$8($2)" in it.
Thanks!

Regards,
Chao-ying

<67> # cat vect1.c
#define N 16

void fbar (float *);
float a[N];
float b[N];

/* multiple loops */
foo (int n)
{
  int i;

  /* Vectorizable.  */
  for (i = 0; i < N; i++){
    a[i] = b[i];
  }

  fbar (a);
}

<68> #
mipsisa64-elf-gcc -O2 -mips64 -mpaired-single -ftree-vectorize -fdump-tree-v
ect-stats -S vect1.c

<69> # cat vect1.s
        .file   1 "vect1.c"
        .section .mdebug.eabi64
        .section .gcc_compiled_long64
        .previous
        .text
        .align  2
        .align  3
        .globl  foo
        .ent    foo
foo:
        .frame  $sp,0,$31               # vars= 0, regs= 0/0, args= 0, gp= 0
        .mask   0x00000000,0
        .fmask  0x00000000,0
        .set    noreorder
        .set    nomacro

        lui     $4,%hi(a)
        lui     $2,%hi(b)
        daddiu  $9,$2,%lo(b)
        daddiu  $8,$4,%lo(a)
        move    $6,$0
        move    $5,$0
        li      $7,8                    # 0x8
        .align  3
$L2:
        dsll    $2,$5,32
        dsrl    $2,$2,32
        <ANYF:loadx>    $f0,$9($2)
        addiu   $3,$6,1
        addiu   $5,$5,8
        <ANYF:storex>   $f0,$8($2)
        bne     $7,$3,$L2
        move    $6,$3

        j       fbar
        daddiu  $4,$4,%lo(a)

        .set    macro
        .set    reorder
        .end    foo
        .size   foo, .-foo

        .comm   b,64,8

        .comm   a,64,8
        .ident  "GCC: (GNU) 4.0.0 20040924 (experimental)"

<70> # cat vect1.c.t48.vect

;; Function foo (foo)


loop at vect1.c:14: LOOP VECTORIZED.

vectorized 1 loops in function.
NOTE: no flow-sensitive alias info for vect_pb.2_16 in vect_var_.1_5 =
(*vect_pb.2_16)[ivtmp.5_15];
NOTE: no flow-sensitive alias info for vect_pa.6_1 in
(*vect_pa.6_1)[ivtmp.9_17] = vect_var_.1_5;

DFA Statistics for foo

---------------------------------------------------------
                                Number of        Memory
                                instances         used
---------------------------------------------------------
Referenced variables                     15         60b
Statements annotated                      0          0b
Variables annotated                       0          0b
USE operands                              0          0b
DEF operands                              0          0b
VUSE operands                             0          0b
V_MAY_DEF operands                        0          0b
V_MUST_DEF operands                       0          0b
PHI nodes                                 5        260b
PHI arguments                            10        120b
---------------------------------------------------------
Total memory used by DFA/SSA data                  440b
---------------------------------------------------------

Average number of arguments per PHI node: 2.0 (max: 2)


Hash table statistics:
    def_blocks: size 31, 2 elements, 0.000000 collision/search ratio


DFA Statistics for foo

---------------------------------------------------------
                                Number of        Memory
                                instances         used
---------------------------------------------------------
Referenced variables                     15         60b
Statements annotated                      0          0b
Variables annotated                       0          0b
USE operands                              0          0b
DEF operands                              0          0b
VUSE operands                             0          0b
V_MAY_DEF operands                        0          0b
V_MUST_DEF operands                       0          0b
PHI nodes                                 6        312b
PHI arguments                            11        132b
---------------------------------------------------------
Total memory used by DFA/SSA data                  504b
---------------------------------------------------------

Average number of arguments per PHI node: 1.8 (max: 2)


Hash table statistics:
    def_blocks: size 31, 1 elements, 0.000000 collision/search ratio

foo (n)
{
  int ivtmp.10;
  int ivtmp.9;
  float * vect_pa.8;
  int newinit.7;
  <unnamed type>[<unknown>] * vect_pa.6;
  int ivtmp.5;
  float * vect_pb.4;
  int newinit.3;
  <unnamed type>[<unknown>] * vect_pb.2;
  <unnamed type> vect_var_.1;
  float b[16];
  float a[16];
  int i;
  float D.1169;
  int i.0;

<bb 0>:

<L6>:;
  vect_pb.4_6 = &b[0];
  vect_pb.2_16 = (<unnamed type>[<unknown>] *) vect_pb.4_6;
  vect_pa.8_2 = &a[0];
  vect_pa.6_1 = (<unnamed type>[<unknown>] *) vect_pa.8_2;

  # ivtmp.10_19 = PHI <0(4), ivtmp.10_20(3)>;
  # ivtmp.9_17 = PHI <0(4), ivtmp.9_18(3)>;
  # ivtmp.5_15 = PHI <0(4), ivtmp.5_12(3)>;
  # i_14 = PHI <0(4), i_10(3)>;
<L0>:;
  vect_var_.1_5 = (*vect_pb.2_16)[ivtmp.5_15];
  ivtmp.5_12 = ivtmp.5_15 + 1;
  D.1169_8 = b[i_14];
  (*vect_pa.6_1)[ivtmp.9_17] = vect_var_.1_5;
  ivtmp.9_18 = ivtmp.9_17 + 1;
  i_10 = i_14 + 1;
  ivtmp.10_20 = ivtmp.10_19 + 1;
  if (ivtmp.10_20 < 8) goto <L5>; else goto <L2>;

<L5>:;
  goto <bb 1> (<L0>);

<L2>:;
  fbar (&a);
  return;

}


<71> # cat vect1.c.t49.vect

;; Function foo (foo)


loop at vect1.c:14: LOOP VECTORIZED.

vectorized 1 loops in function.
NOTE: no flow-sensitive alias info for vect_pb.2_2 in vect_var_.1_1 =
*vect_pb.2_2;
NOTE: no flow-sensitive alias info for vect_pa.7_23 in *vect_pa.7_23 =
vect_var_.1_1;

DFA Statistics for foo

---------------------------------------------------------
                                Number of        Memory
                                instances         used
---------------------------------------------------------
Referenced variables                     17         68b
Statements annotated                      0          0b
Variables annotated                       0          0b
USE operands                              0          0b
DEF operands                              0          0b
VUSE operands                             0          0b
V_MAY_DEF operands                        0          0b
V_MUST_DEF operands                       0          0b
PHI nodes                                 5        260b
PHI arguments                            10        120b
---------------------------------------------------------
Total memory used by DFA/SSA data                  448b
---------------------------------------------------------

Average number of arguments per PHI node: 2.0 (max: 2)


Hash table statistics:
    def_blocks: size 31, 2 elements, 0.000000 collision/search ratio


DFA Statistics for foo

---------------------------------------------------------
                                Number of        Memory
                                instances         used
---------------------------------------------------------
Referenced variables                     17         68b
Statements annotated                      0          0b
Variables annotated                       0          0b
USE operands                              0          0b
DEF operands                              0          0b
VUSE operands                             0          0b
V_MAY_DEF operands                        0          0b
V_MUST_DEF operands                       0          0b
PHI nodes                                 6        312b
PHI arguments                            11        132b
---------------------------------------------------------
Total memory used by DFA/SSA data                  512b
---------------------------------------------------------

Average number of arguments per PHI node: 1.8 (max: 2)


Hash table statistics:
    def_blocks: size 31, 1 elements, 0.000000 collision/search ratio

foo (n)
{
  int ivtmp.12;
  int update.11;
  int ivtmp.10;
  float * vect_pa.9;
  int newinit.8;
  <unnamed type> * vect_pa.7;
  int update.6;
  int ivtmp.5;
  float * vect_pb.4;
  int newinit.3;
  <unnamed type> * vect_pb.2;
  <unnamed type> vect_var_.1;
  int i;
  float D.1169;
  int i.0;

<bb 0>:

<L6>:;
  vect_pb.4_9 = &b[0];
  vect_pb.2_17 = (<unnamed type> *) vect_pb.4_9;
  vect_pa.9_18 = &a[0];
  vect_pa.7_19 = (<unnamed type> *) vect_pa.9_18;

  # ivtmp.12_24 = PHI <0(4), ivtmp.12_25(3)>;
  # ivtmp.10_20 = PHI <0(4), ivtmp.10_21(3)>;
  # ivtmp.5_16 = PHI <0(4), ivtmp.5_13(3)>;
  # i_15 = PHI <0(4), i_12(3)>;
<L0>:;
  update.6_8 = ivtmp.5_16 * 8;
  vect_pb.2_2 = update.6_8 + vect_pb.2_17;
  vect_var_.1_1 = *vect_pb.2_2;
  ivtmp.5_13 = ivtmp.5_16 + 1;
  D.1169_10 = b[i_15];
  update.11_22 = ivtmp.10_20 * 8;
  vect_pa.7_23 = vect_pa.7_19 + update.11_22;
  *vect_pa.7_23 = vect_var_.1_1;
  ivtmp.10_21 = ivtmp.10_20 + 1;
  i_12 = i_15 + 1;
  ivtmp.12_25 = ivtmp.12_24 + 1;
  if (ivtmp.12_25 < 8) goto <L5>; else goto <L2>;

<L5>:;
  goto <bb 1> (<L0>);

<L2>:;
  fbar (&a);
  return;

}



----- Original Message ----- 
From: "Dorit Naishlos" <DORIT@il.ibm.com>
To: "Fu, Chao-Ying" <fu@mips.com>
Cc: <dpatel@apple.com>; <gcc-patches@gcc.gnu.org>; "Gerald Pfeifer"
<gerald@pfeifer.com>; "Giovanni Bajo" <giovannibajo@libero.it>; "Stephens,
Nigel" <nigel@mercury.mips.com>; "Thekkath, Radhika"
<radhika@mercury.mips.com>; "Richard Sandiford" <rsandifo@redhat.com>;
"Uhler, Mike" <uhler@mercury.mips.com>; "Jim Wilson"
<wilson@specifixinc.com>
Sent: Friday, September 24, 2004 2:39 AM
Subject: RE: [patch] extend.texi MIPS PS/3D Support


>
> Could you send me some more detail (gdb traceback, what is the mode that's
> failing in int_mode_for_mode, the .vect dump file when compiling it with
> -fdump-tree-vect-details)? I can look into it after the weekend (on
> Sunday).
>
> dorit
>
>
>
> |---------+---------------------------->
> |         |           "Fu, Chao-Ying"  |
> |         |           <fu@mips.com>    |
> |         |                            |
> |         |           23/09/2004 20:17 |
> |---------+---------------------------->
>
>---------------------------------------------------------------------------
------------------------------------|
>   |
|
>   |       To:       "Richard Sandiford" <rsandifo@redhat.com>
|
>   |       cc:       Dorit Naishlos/Haifa/IBM@IBMIL, "Giovanni Bajo"
<giovannibajo@libero.it>,                     |
>   |        <gcc-patches@gcc.gnu.org>, <dpatel@apple.com>, "Gerald Pfeifer"
<gerald@pfeifer.com>, "Stephens, Nigel"|
>   |        <nigel@mercury.mips.com>, "Thekkath, Radhika"
<radhika@mercury.mips.com>, "Uhler, Mike"                |
>   |        <uhler@mercury.mips.com>, "Jim Wilson" <wilson@specifixinc.com>
|
>   |       Subject:  RE: [patch] extend.texi MIPS PS/3D Support
|
>
>---------------------------------------------------------------------------
------------------------------------|
>
>
>
>
> I tested one case and got ICE, unfortunately.
>
> Regards,
> Chao-ying
> ---
> <540> # cat vect1.c
> #define N 16
>
> void fbar (float *);
>
> /* multiple loops */
> foo (int n)
> {
>   int i;
>   float a[N];
>   float b[N];
>
>   /* Vectorizable.  */
>   for (i = 0; i < N; i++){
>     a[i] = b[i];
>   }
>
>   fbar (a);
> }
> <541> # mipsisa64-elf-gcc -O2 -mips64 -mpaired-single -ftree-vectorize
> -fdump-tree-vect-stats -S vect1.c
> vect1.c: In function 'foo':
> vect1.c:7: internal compiler error: in int_mode_for_mode, at
> stor-layout.c:251
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
>
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org
> [mailto:gcc-patches-owner@gcc.gnu.org]On Behalf Of Richard Sandiford
> Sent: Thursday, September 23, 2004 9:10 AM
> To: Fu, Chao-Ying
> Cc: Dorit Naishlos; Giovanni Bajo; gcc-patches@gcc.gnu.org;
> dpatel@apple.com; Gerald Pfeifer; Stephens, Nigel; Thekkath, Radhika;
> Uhler, Mike; Jim Wilson
> Subject: Re: [patch] extend.texi MIPS PS/3D Support
>
>
> "Fu, Chao-Ying" <fu@mips.com> writes:
> > Ok.  We need to put this into "mips.h".  Thanks!
> > [...]
> > Index: mips.h
> > ===================================================================
> > RCS file: /cvsroot/gcc/gcc/gcc/config/mips/mips.h,v
> > retrieving revision 1.370
> > diff -c -3 -p -r1.370 mips.h
> > *** mips.h             18 Sep 2004 19:19:37 -0000          1.370
> > --- mips.h             22 Sep 2004 21:07:30 -0000
> > *************** extern const struct mips_cpu_info *mips_
> > *** 243,248 ****
> > --- 243,250 ----
> >                                                ((target_flags &
> MASK_PAIRED_SINGLE) != 0)
> >   #define TARGET_MIPS3D                        ((target_flags &
> MASK_MIPS3D) != 0)
> >
> > + #define UNITS_PER_SIMD_WORD            (TARGET_PAIRED_SINGLE_FLOAT ? 8
> : 0)
> > +
> >   /* True if we should use NewABI-style relocation operators for
> >      symbolic addresses.  This is never true for mips16 code,
> >      which has its own conventions.  */
>
> Have you tested this?
>
> Richard
>
>
>
>

  reply	other threads:[~2004-09-24 21:08 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-23 18:02 Fu, Chao-Ying
2004-09-24 12:17 ` Dorit Naishlos
2004-09-24 21:35   ` Chao-ying Fu [this message]
2004-09-25 10:53     ` Richard Sandiford
2004-09-27 23:32       ` Chao-ying Fu
2004-09-28  0:32         ` Dorit Naishlos
2004-09-28  0:41           ` Richard Henderson
2004-09-28 14:07             ` Dorit Naishlos
2004-09-28 14:08               ` Paolo Bonzini
2004-09-29 11:41                 ` Paolo Bonzini
2004-09-29 17:33                   ` Richard Henderson
2004-09-29 23:39                   ` Dorit Naishlos
2004-10-11 22:48                   ` [patch] vectorizer: fix handling of non VECTOR_MODE_P vectypes Dorit Naishlos
2004-10-12  0:40                     ` Richard Henderson
2004-10-12 12:54                       ` Dorit Naishlos
2004-10-12 16:37                         ` Richard Henderson
2004-10-12 18:21                           ` Dorit Naishlos
2004-10-12 20:49                             ` James A. Morrison
2004-10-13  8:46                               ` Dorit Naishlos
2004-10-13 19:18                         ` Richard Henderson
2004-09-28 19:35               ` [patch] extend.texi MIPS PS/3D Support Chao-ying Fu
2004-09-28 23:04               ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2004-09-24  0:12 Fu, Chao-Ying
2004-10-02 11:35 ` Richard Sandiford
2004-10-05  7:15   ` Richard Sandiford
2004-09-22 22:13 Fu, Chao-Ying
2004-09-22 22:05 Fu, Chao-Ying
2004-09-23 17:40 ` Richard Sandiford
2004-09-22  0:21 Fu, Chao-Ying
2004-09-22  2:46 ` Giovanni Bajo
2004-09-22  3:14   ` Devang Patel
2004-09-22 11:24     ` Dorit Naishlos
2004-09-22  7:36   ` Richard Sandiford
2004-09-22 11:06   ` Dorit Naishlos
2004-10-26 14:29   ` Gerald Pfeifer
2004-09-22  8:53 ` Richard Sandiford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000a01c4a27a$8c5b73d0$a914a8c0@MIPS.COM' \
    --to=fu@mips.com \
    --cc=DORIT@il.ibm.com \
    --cc=dpatel@apple.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=giovannibajo@libero.it \
    --cc=nigel@mercury.mips.com \
    --cc=radhika@mercury.mips.com \
    --cc=rsandifo@redhat.com \
    --cc=uhler@mercury.mips.com \
    --cc=wilson@specifixinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).