OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [costmodel/] [ppc/] [ppc-costmodel-vect.exp] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2010
2
# Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with GCC; see the file COPYING3.  If not see
16
# .
17
 
18
# GCC testsuite that uses the `dg.exp' driver.
19
 
20
# Load support procs.
21
load_lib gcc-dg.exp
22
 
23
# Exit immediately if this isn't a powerpc target.
24
if { ![istarget powerpc*-*-*] } then {
25
  return
26
}
27
 
28
# Skip targets not supporting -maltivec.
29
if ![is-effective-target powerpc_altivec_ok] {
30
  return
31
}
32
 
33
# Set up flags used for tests that don't specify options.
34
set DEFAULT_VECTCFLAGS ""
35
 
36
# These flags are used for all targets.
37
lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model"
38
 
39
# If the target system supports vector instructions, the default action
40
# for a test is 'run', otherwise it's 'compile'.  Save current default.
41
# Executing vector instructions on a system without hardware vector support
42
# is also disabled by a call to check_vect, but disabling execution here is
43
# more efficient.
44
global dg-do-what-default
45
set save-dg-do-what-default ${dg-do-what-default}
46
 
47
lappend DEFAULT_VECTCFLAGS "-maltivec"
48
if [check_vmx_hw_available] {
49
    set dg-do-what-default run
50
} else {
51
    if [is-effective-target ilp32] {
52
        # Specify a cpu that supports VMX for compile-only tests.
53
        lappend DEFAULT_VECTCFLAGS "-mcpu=970"
54
    }
55
    set dg-do-what-default compile
56
}
57
 
58
# Initialize `dg'.
59
dg-init
60
 
61
set VECT_SLP_CFLAGS $DEFAULT_VECTCFLAGS
62
 
63
lappend DEFAULT_VECTCFLAGS "-fdump-tree-vect-details"
64
lappend VECT_SLP_CFLAGS "-fdump-tree-slp-details"
65
 
66
# Main loop.
67
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/costmodel-pr*.\[cS\]]]  \
68
        "" $DEFAULT_VECTCFLAGS
69
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/costmodel-vect-*.\[cS\]]]  \
70
        "" $DEFAULT_VECTCFLAGS
71
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/costmodel-slp-*.\[cS\]]]  \
72
        "" $DEFAULT_VECTCFLAGS
73
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/costmodel-bb-slp*.\[cS\]]]  \
74
        "" $VECT_SLP_CFLAGS
75
 
76
#### Tests with special options
77
global SAVED_DEFAULT_VECTCFLAGS
78
set SAVED_DEFAULT_VECTCFLAGS $DEFAULT_VECTCFLAGS
79
 
80
# -ffast-math tests
81
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
82
lappend DEFAULT_VECTCFLAGS "-ffast-math"
83
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/costmodel-fast-math-vect*.\[cS\]]]  \
84
        "" $DEFAULT_VECTCFLAGS
85
 
86
# Clean up.
87
set dg-do-what-default ${save-dg-do-what-default}
88
 
89
# All done.
90
dg-finish

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.