diff options
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106831.patch')
-rw-r--r-- | toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106831.patch | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106831.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106831.patch deleted file mode 100644 index ad91d7736..000000000 --- a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106831.patch +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | 2011-10-19 Andrew Stubbs <ams@codesourcery.com> | ||
2 | |||
3 | Backport from FSF: | ||
4 | |||
5 | 2011-10-18 Andrew Stubbs <ams@codesourcery.com> | ||
6 | |||
7 | PR tree-optimization/50717 | ||
8 | |||
9 | gcc/ | ||
10 | * tree-ssa-math-opts.c (is_widening_mult_p): Remove the 'type' | ||
11 | parameter. Calculate 'type' from stmt. | ||
12 | (convert_mult_to_widen): Update call the is_widening_mult_p. | ||
13 | (convert_plusminus_to_widen): Likewise. | ||
14 | |||
15 | gcc/testsuite/ | ||
16 | * gcc.dg/pr50717-1.c: New file. | ||
17 | * gcc.target/arm/wmul-12.c: Correct types. | ||
18 | * gcc.target/arm/wmul-8.c: Correct types. | ||
19 | |||
20 | === added file 'gcc/testsuite/gcc.dg/pr50717-1.c' | ||
21 | --- old/gcc/testsuite/gcc.dg/pr50717-1.c 1970-01-01 00:00:00 +0000 | ||
22 | +++ new/gcc/testsuite/gcc.dg/pr50717-1.c 2011-10-19 14:42:50 +0000 | ||
23 | @@ -0,0 +1,26 @@ | ||
24 | +/* PR tree-optimization/50717 */ | ||
25 | +/* Ensure that widening multiply-and-accumulate is not used where integer | ||
26 | + type promotion or users' casts should prevent it. */ | ||
27 | + | ||
28 | +/* { dg-options "-O2 -fdump-tree-widening_mul" } */ | ||
29 | + | ||
30 | +long long | ||
31 | +f (unsigned int a, char b, long long c) | ||
32 | +{ | ||
33 | + return (a * b) + c; | ||
34 | +} | ||
35 | + | ||
36 | +int | ||
37 | +g (short a, short b, int c) | ||
38 | +{ | ||
39 | + return (short)(a * b) + c; | ||
40 | +} | ||
41 | + | ||
42 | +int | ||
43 | +h (char a, char b, int c) | ||
44 | +{ | ||
45 | + return (char)(a * b) + c; | ||
46 | +} | ||
47 | + | ||
48 | +/* { dg-final { scan-tree-dump-times "WIDEN_MULT_PLUS_EXPR" 0 "widening_mul" } } */ | ||
49 | +/* { dg-final { cleanup-tree-dump "widening_mul" } } */ | ||
50 | |||
51 | === modified file 'gcc/testsuite/gcc.target/arm/wmul-12.c' | ||
52 | --- old/gcc/testsuite/gcc.target/arm/wmul-12.c 2011-07-22 15:46:42 +0000 | ||
53 | +++ new/gcc/testsuite/gcc.target/arm/wmul-12.c 2011-10-19 14:42:50 +0000 | ||
54 | @@ -4,8 +4,8 @@ | ||
55 | long long | ||
56 | foo (int *b, int *c) | ||
57 | { | ||
58 | - int tmp = *b * *c; | ||
59 | - return 10 + (long long)tmp; | ||
60 | + long long tmp = (long long)*b * *c; | ||
61 | + return 10 + tmp; | ||
62 | } | ||
63 | |||
64 | /* { dg-final { scan-assembler "smlal" } } */ | ||
65 | |||
66 | === modified file 'gcc/testsuite/gcc.target/arm/wmul-8.c' | ||
67 | --- old/gcc/testsuite/gcc.target/arm/wmul-8.c 2011-07-15 14:16:54 +0000 | ||
68 | +++ new/gcc/testsuite/gcc.target/arm/wmul-8.c 2011-10-19 14:42:50 +0000 | ||
69 | @@ -4,7 +4,7 @@ | ||
70 | long long | ||
71 | foo (long long a, int *b, int *c) | ||
72 | { | ||
73 | - return a + *b * *c; | ||
74 | + return a + (long long)*b * *c; | ||
75 | } | ||
76 | |||
77 | /* { dg-final { scan-assembler "smlal" } } */ | ||
78 | |||
79 | === modified file 'gcc/tree-ssa-math-opts.c' | ||
80 | --- old/gcc/tree-ssa-math-opts.c 2011-09-08 20:11:43 +0000 | ||
81 | +++ new/gcc/tree-ssa-math-opts.c 2011-10-19 14:42:50 +0000 | ||
82 | @@ -1351,10 +1351,12 @@ | ||
83 | and *TYPE2_OUT would give the operands of the multiplication. */ | ||
84 | |||
85 | static bool | ||
86 | -is_widening_mult_p (tree type, gimple stmt, | ||
87 | +is_widening_mult_p (gimple stmt, | ||
88 | tree *type1_out, tree *rhs1_out, | ||
89 | tree *type2_out, tree *rhs2_out) | ||
90 | { | ||
91 | + tree type = TREE_TYPE (gimple_assign_lhs (stmt)); | ||
92 | + | ||
93 | if (TREE_CODE (type) != INTEGER_TYPE | ||
94 | && TREE_CODE (type) != FIXED_POINT_TYPE) | ||
95 | return false; | ||
96 | @@ -1416,7 +1418,7 @@ | ||
97 | if (TREE_CODE (type) != INTEGER_TYPE) | ||
98 | return false; | ||
99 | |||
100 | - if (!is_widening_mult_p (type, stmt, &type1, &rhs1, &type2, &rhs2)) | ||
101 | + if (!is_widening_mult_p (stmt, &type1, &rhs1, &type2, &rhs2)) | ||
102 | return false; | ||
103 | |||
104 | to_mode = TYPE_MODE (type); | ||
105 | @@ -1592,7 +1594,7 @@ | ||
106 | if (code == PLUS_EXPR | ||
107 | && (rhs1_code == MULT_EXPR || rhs1_code == WIDEN_MULT_EXPR)) | ||
108 | { | ||
109 | - if (!is_widening_mult_p (type, rhs1_stmt, &type1, &mult_rhs1, | ||
110 | + if (!is_widening_mult_p (rhs1_stmt, &type1, &mult_rhs1, | ||
111 | &type2, &mult_rhs2)) | ||
112 | return false; | ||
113 | add_rhs = rhs2; | ||
114 | @@ -1600,7 +1602,7 @@ | ||
115 | } | ||
116 | else if (rhs2_code == MULT_EXPR || rhs2_code == WIDEN_MULT_EXPR) | ||
117 | { | ||
118 | - if (!is_widening_mult_p (type, rhs2_stmt, &type1, &mult_rhs1, | ||
119 | + if (!is_widening_mult_p (rhs2_stmt, &type1, &mult_rhs1, | ||
120 | &type2, &mult_rhs2)) | ||
121 | return false; | ||
122 | add_rhs = rhs1; | ||
123 | |||