public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/18173] New: execution failure in vect-[8,30].c on ppc-linux
@ 2004-10-27 11:35 dorit at il dot ibm dot com
  2004-10-27 11:43 ` [Bug target/18173] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dorit at il dot ibm dot com @ 2004-10-27 11:35 UTC (permalink / raw)
  To: gcc-bugs

Getting the following testsuite failures on ppc-linux:
FAIL: gcc.dg/vect/vect-30.c execution test
FAIL: gcc.dg/vect/vect-8.c execution test

These failures seem to be related to alignment - when the array types are 
changed from float to afloat:
typedef float afloat __attribute__ ((__aligned__(16)));
the tests pass ok.

When compiling the original version, the vectorizer forces the alignment of 
these arrays:

      if (vect_debug_details (NULL))
        fprintf (dump_file, "force alignment");
      DECL_ALIGN (base) = TYPE_ALIGN (vectype);
      DECL_USER_ALIGN (base) = TYPE_ALIGN (vectype);

The tree dump files generated in both cases (float and afloat) looks identical,
as well as the RTL dumps; in both cases we have the following vector load/store 
generated (note the A128): 

(insn:TI 44 43 47 3 (set (reg:V4SF 77 0 [151])
        (mem:V4SF (reg/f:SI 11 11 [orig:130 ivtmp.55 ] [130]) [4 S16 A128])) 
482 {altivec_lvx_4sf} (nil)
    (expr_list:REG_EQUIV (mem:V4SF (reg/f:SI 9 9 [orig:129 ivtmp.65 ] [129]) [4 
S16 A128])
        (nil)))

(insn:TI 45 47 48 3 (set (mem:V4SF (reg/f:SI 9 9 [orig:129 ivtmp.65 ] [129]) [4 
S16 A128])
        (reg:V4SF 77 0 [151])) 486 {altivec_stvx_4sf} (insn_list:REG_DEP_TRUE 
44 (nil))
    (nil))

Yet the version with afloats runs correctly, and the original version aborts.

Possible places to look into:
- vect_can_force_dr_alignment_p is wrong?
- PREFERRD_STACK_BOUNDARY != STACK_BOUNDARY (not the case here)
- setting DECL_USER_ALIGN/DECL_ALIGN is not enough?
- the decl alignment attribute not propagated to RTL? (looks like it is)
- assembler problem?

This may be related to PR17589.

I can send a patch that changes floats to afloats, as a temporary fix.

-- 
           Summary: execution failure in vect-[8,30].c on ppc-linux
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dorit at il dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-suse-linux
  GCC host triplet: powerpc-suse-linux
GCC target triplet: powerpc-suse-linux


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


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

end of thread, other threads:[~2004-11-30 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27 11:35 [Bug regression/18173] New: execution failure in vect-[8,30].c on ppc-linux dorit at il dot ibm dot com
2004-10-27 11:43 ` [Bug target/18173] " pinskia at gcc dot gnu dot org
2004-11-23 20:08 ` dorit at il dot ibm dot com
2004-11-30 14:03 ` cvs-commit at gcc dot gnu dot org
2004-11-30 14:10 ` dorit at il dot ibm dot com
2004-11-30 14:34 ` pinskia at gcc dot gnu dot org

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