OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [costmodel/] [i386/] [i386-costmodel-vect.exp] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2008, 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 x86 target.
24
if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
25
  return
26
}
27
 
28
# Set up flags used for tests that don't specify options.
29
set DEFAULT_VECTCFLAGS ""
30
 
31
# These flags are used for all targets.
32
lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model"
33
 
34
# If the target system supports vector instructions, the default action
35
# for a test is 'run', otherwise it's 'compile'.  Save current default.
36
# Executing vector instructions on a system without hardware vector support
37
# is also disabled by a call to check_vect, but disabling execution here is
38
# more efficient.
39
global dg-do-what-default
40
set save-dg-do-what-default ${dg-do-what-default}
41
 
42
if { ![check_effective_target_sse2] } then {
43
  return
44
}
45
lappend DEFAULT_VECTCFLAGS "-msse2"
46
if [check_sse2_hw_available] {
47
    set dg-do-what-default run
48
} else {
49
    set dg-do-what-default compile
50
}
51
 
52
# Initialize `dg'.
53
dg-init
54
 
55
lappend DEFAULT_VECTCFLAGS "-fdump-tree-vect-details"
56
 
57
# Main loop.
58
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/costmodel-vect-*.\[cS\]]]  \
59
        "" $DEFAULT_VECTCFLAGS
60
 
61
#### Tests with special options
62
global SAVED_DEFAULT_VECTCFLAGS
63
set SAVED_DEFAULT_VECTCFLAGS $DEFAULT_VECTCFLAGS
64
 
65
# -ffast-math tests
66
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
67
lappend DEFAULT_VECTCFLAGS "-ffast-math"
68
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/costmodel-fast-math-vect*.\[cS\]]]  \
69
        "" $DEFAULT_VECTCFLAGS
70
 
71
# Clean up.
72
set dg-do-what-default ${save-dg-do-what-default}
73
 
74
# All done.
75
dg-finish

powered by: WebSVN 2.1.0

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