diff options
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106738.patch')
| -rw-r--r-- | toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106738.patch | 177 |
1 files changed, 0 insertions, 177 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106738.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106738.patch deleted file mode 100644 index 3dde3b29a1..0000000000 --- a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106738.patch +++ /dev/null | |||
| @@ -1,177 +0,0 @@ | |||
| 1 | 2011-04-27 Ira Rosen <ira.rosen@linaro.org> | ||
| 2 | |||
| 3 | Backport from FSF: | ||
| 4 | |||
| 5 | 2011-04-03 Richard Guenther <rguenther@suse.de> | ||
| 6 | Ira Rosen <ira.rosen@linaro.org> | ||
| 7 | |||
| 8 | gcc/ | ||
| 9 | * tree-if-conv.c (memrefs_read_or_written_unconditionally): Strip all | ||
| 10 | non-variable offsets and compare the remaining bases of the two | ||
| 11 | accesses instead of looking for exact same data-ref. | ||
| 12 | |||
| 13 | gcc/testsuite/ | ||
| 14 | * gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c: New test. | ||
| 15 | * gcc.dg/vect/vect.exp: Run if-cvt-stores-vect* tests with | ||
| 16 | -ftree-loop-if-convert-stores. | ||
| 17 | |||
| 18 | === added file 'gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c' | ||
| 19 | --- old/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c 1970-01-01 00:00:00 +0000 | ||
| 20 | +++ new/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c 2011-04-24 07:45:49 +0000 | ||
| 21 | @@ -0,0 +1,69 @@ | ||
| 22 | +/* { dg-require-effective-target vect_int } */ | ||
| 23 | + | ||
| 24 | +#include <stdarg.h> | ||
| 25 | +#include "tree-vect.h" | ||
| 26 | + | ||
| 27 | +#define N 50 | ||
| 28 | + | ||
| 29 | +typedef struct { | ||
| 30 | + short a; | ||
| 31 | + short b; | ||
| 32 | +} data; | ||
| 33 | + | ||
| 34 | +data in1[N], in2[N], out[N]; | ||
| 35 | +short result[N*2] = {10,-7,11,-6,12,-5,13,-4,14,-3,15,-2,16,-1,17,0,18,1,19,2,20,3,21,4,22,5,23,6,24,7,25,8,26,9,27,10,28,11,29,12,30,13,31,14,32,15,33,16,34,17,35,18,36,19,37,20,38,21,39,22,40,23,41,24,42,25,43,26,44,27,45,28,46,29,47,30,48,31,49,32,50,33,51,34,52,35,53,36,54,37,55,38,56,39,57,40,58,41,59,42}; | ||
| 36 | +short out1[N], out2[N]; | ||
| 37 | + | ||
| 38 | +__attribute__ ((noinline)) void | ||
| 39 | +foo () | ||
| 40 | +{ | ||
| 41 | + int i; | ||
| 42 | + short c, d; | ||
| 43 | + | ||
| 44 | + for (i = 0; i < N; i++) | ||
| 45 | + { | ||
| 46 | + c = in1[i].b; | ||
| 47 | + d = in2[i].b; | ||
| 48 | + | ||
| 49 | + if (c >= d) | ||
| 50 | + { | ||
| 51 | + out[i].b = in1[i].a; | ||
| 52 | + out[i].a = d + 5; | ||
| 53 | + } | ||
| 54 | + else | ||
| 55 | + { | ||
| 56 | + out[i].b = d - 12; | ||
| 57 | + out[i].a = in2[i].a + d; | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +int | ||
| 63 | +main (void) | ||
| 64 | +{ | ||
| 65 | + int i; | ||
| 66 | + | ||
| 67 | + check_vect (); | ||
| 68 | + | ||
| 69 | + for (i = 0; i < N; i++) | ||
| 70 | + { | ||
| 71 | + in1[i].a = i; | ||
| 72 | + in1[i].b = i + 2; | ||
| 73 | + in2[i].a = 5; | ||
| 74 | + in2[i].b = i + 5; | ||
| 75 | + __asm__ volatile (""); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + foo (); | ||
| 79 | + | ||
| 80 | + for (i = 0; i < N; i++) | ||
| 81 | + { | ||
| 82 | + if (out[i].a != result[2*i] || out[i].b != result[2*i+1]) | ||
| 83 | + abort (); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + return 0; | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || {! vect_strided } } } } } */ | ||
| 90 | +/* { dg-final { cleanup-tree-dump "vect" } } */ | ||
| 91 | |||
| 92 | === modified file 'gcc/testsuite/gcc.dg/vect/vect.exp' | ||
| 93 | --- old/gcc/testsuite/gcc.dg/vect/vect.exp 2010-11-22 21:49:19 +0000 | ||
| 94 | +++ new/gcc/testsuite/gcc.dg/vect/vect.exp 2011-04-24 07:45:49 +0000 | ||
| 95 | @@ -210,6 +210,12 @@ | ||
| 96 | dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/ggc-*.\[cS\]]] \ | ||
| 97 | "" $DEFAULT_VECTCFLAGS | ||
| 98 | |||
| 99 | +# -ftree-loop-if-convert-stores | ||
| 100 | +set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS | ||
| 101 | +lappend DEFAULT_VECTCFLAGS "-ftree-loop-if-convert-stores" | ||
| 102 | +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/if-cvt-stores-vect-*.\[cS\]]] \ | ||
| 103 | + "" $DEFAULT_VECTCFLAGS | ||
| 104 | + | ||
| 105 | # With -O3. | ||
| 106 | # Don't allow IPA cloning, because it throws our counts out of whack. | ||
| 107 | set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS | ||
| 108 | |||
| 109 | === modified file 'gcc/tree-if-conv.c' | ||
| 110 | --- old/gcc/tree-if-conv.c 2011-02-23 16:49:52 +0000 | ||
| 111 | +++ new/gcc/tree-if-conv.c 2011-04-24 07:45:49 +0000 | ||
| 112 | @@ -464,8 +464,8 @@ | ||
| 113 | /* Returns true when the memory references of STMT are read or written | ||
| 114 | unconditionally. In other words, this function returns true when | ||
| 115 | for every data reference A in STMT there exist other accesses to | ||
| 116 | - the same data reference with predicates that add up (OR-up) to the | ||
| 117 | - true predicate: this ensures that the data reference A is touched | ||
| 118 | + a data reference with the same base with predicates that add up (OR-up) to | ||
| 119 | + the true predicate: this ensures that the data reference A is touched | ||
| 120 | (read or written) on every iteration of the if-converted loop. */ | ||
| 121 | |||
| 122 | static bool | ||
| 123 | @@ -489,21 +489,38 @@ | ||
| 124 | continue; | ||
| 125 | |||
| 126 | for (j = 0; VEC_iterate (data_reference_p, drs, j, b); j++) | ||
| 127 | - if (DR_STMT (b) != stmt | ||
| 128 | - && same_data_refs (a, b)) | ||
| 129 | - { | ||
| 130 | - tree cb = bb_predicate (gimple_bb (DR_STMT (b))); | ||
| 131 | - | ||
| 132 | - if (DR_RW_UNCONDITIONALLY (b) == 1 | ||
| 133 | - || is_true_predicate (cb) | ||
| 134 | - || is_true_predicate (ca = fold_or_predicates (EXPR_LOCATION (cb), | ||
| 135 | - ca, cb))) | ||
| 136 | - { | ||
| 137 | - DR_RW_UNCONDITIONALLY (a) = 1; | ||
| 138 | - DR_RW_UNCONDITIONALLY (b) = 1; | ||
| 139 | - found = true; | ||
| 140 | - break; | ||
| 141 | - } | ||
| 142 | + { | ||
| 143 | + tree ref_base_a = DR_REF (a); | ||
| 144 | + tree ref_base_b = DR_REF (b); | ||
| 145 | + | ||
| 146 | + if (DR_STMT (b) == stmt) | ||
| 147 | + continue; | ||
| 148 | + | ||
| 149 | + while (TREE_CODE (ref_base_a) == COMPONENT_REF | ||
| 150 | + || TREE_CODE (ref_base_a) == IMAGPART_EXPR | ||
| 151 | + || TREE_CODE (ref_base_a) == REALPART_EXPR) | ||
| 152 | + ref_base_a = TREE_OPERAND (ref_base_a, 0); | ||
| 153 | + | ||
| 154 | + while (TREE_CODE (ref_base_b) == COMPONENT_REF | ||
| 155 | + || TREE_CODE (ref_base_b) == IMAGPART_EXPR | ||
| 156 | + || TREE_CODE (ref_base_b) == REALPART_EXPR) | ||
| 157 | + ref_base_b = TREE_OPERAND (ref_base_b, 0); | ||
| 158 | + | ||
| 159 | + if (!operand_equal_p (ref_base_a, ref_base_b, 0)) | ||
| 160 | + { | ||
| 161 | + tree cb = bb_predicate (gimple_bb (DR_STMT (b))); | ||
| 162 | + | ||
| 163 | + if (DR_RW_UNCONDITIONALLY (b) == 1 | ||
| 164 | + || is_true_predicate (cb) | ||
| 165 | + || is_true_predicate (ca | ||
| 166 | + = fold_or_predicates (EXPR_LOCATION (cb), ca, cb))) | ||
| 167 | + { | ||
| 168 | + DR_RW_UNCONDITIONALLY (a) = 1; | ||
| 169 | + DR_RW_UNCONDITIONALLY (b) = 1; | ||
| 170 | + found = true; | ||
| 171 | + break; | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | } | ||
| 175 | |||
| 176 | if (!found) | ||
| 177 | |||
