1
# DP: updates from the 4.5 branch upto 20110421 (r172810).
1
# DP: updates from the 4.5 branch upto 20110608 (r174800).
5
5
cat > ${dir}LAST_UPDATED <<EOF
6
Thu Apr 21 07:08:12 CEST 2011
7
Thu Apr 21 05:08:12 UTC 2011 (revision 172810)
6
Wed Jun 8 11:49:21 CEST 2011
7
Wed Jun 8 09:49:21 UTC 2011 (revision 174800)
11
svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@172013 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch \
11
svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@173417 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch \
12
12
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
13
13
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
15
Index: libgomp/fortran.c
16
===================================================================
17
--- a/src/libgomp/fortran.c (revision
18
+++ b/src/libgomp/fortran.c (revision
20
-/* Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
21
+/* Copyright (C) 2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
22
Contributed by Jakub Jelinek <jakub@redhat.com>.
24
This file is part of the GNU OpenMP Library (libgomp).
27
#include "libgomp_f.h"
31
#ifdef HAVE_ATTRIBUTE_ALIAS
32
/* Use internal aliases if possible. */
34
omp_lock_symver (omp_test_nest_lock_)
37
+#define TO_INT(x) ((x) > INT_MIN ? (x) < INT_MAX ? (x) : INT_MAX : INT_MIN)
40
omp_set_dynamic_ (const int32_t *set)
44
omp_set_dynamic_8_ (const int64_t *set)
46
- omp_set_dynamic (*set);
47
+ omp_set_dynamic (!!*set);
53
omp_set_nested_8_ (const int64_t *set)
55
- omp_set_nested (*set);
56
+ omp_set_nested (!!*set);
62
omp_set_num_threads_8_ (const int64_t *set)
64
- omp_set_num_threads (*set);
65
+ omp_set_num_threads (TO_INT (*set));
71
omp_set_schedule_8_ (const int32_t *kind, const int64_t *modifier)
73
- omp_set_schedule (*kind, *modifier);
74
+ omp_set_schedule (*kind, TO_INT (*modifier));
80
omp_set_max_active_levels_8_ (const int64_t *levels)
82
- omp_set_max_active_levels (*levels);
83
+ omp_set_max_active_levels (TO_INT (*levels));
89
omp_get_ancestor_thread_num_8_ (const int64_t *level)
91
- return omp_get_ancestor_thread_num (*level);
92
+ return omp_get_ancestor_thread_num (TO_INT (*level));
98
omp_get_team_size_8_ (const int64_t *level)
100
- return omp_get_team_size (*level);
101
+ return omp_get_team_size (TO_INT (*level));
105
Index: libgomp/ChangeLog
106
===================================================================
107
--- a/src/libgomp/ChangeLog (revision
108
+++ b/src/libgomp/ChangeLog (revision
110
+2011-05-06 Jakub Jelinek <jakub@redhat.com>
113
+ * fortran.c: Include limits.h.
115
+ (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
117
+ (omp_set_num_threads_8_, omp_set_schedule_8_,
118
+ omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
119
+ omp_get_team_size_8_): Use TO_INT macro.
120
+ * testsuite/libgomp.fortran/pr48894.f90: New test.
122
2011-04-28 Release Manager
124
* GCC 4.5.3 released.
125
Index: libgomp/testsuite/libgomp.fortran/pr48894.f90
126
===================================================================
127
--- a/src/libgomp/testsuite/libgomp.fortran/pr48894.f90 (revision
128
+++ b/src/libgomp/testsuite/libgomp.fortran/pr48894.f90 (revision
132
+! { dg-options "-fdefault-integer-8" }
135
+ integer, parameter :: zero = 0
140
+ !$omp parallel private (l)
141
+ l = omp_get_ancestor_thread_num (-HUGE (zero)) .ne. -1
142
+ l = l .or. (omp_get_ancestor_thread_num (HUGE (zero)) .ne. -1)
143
+ l = l .or. (omp_get_team_size (-HUGE (zero)) .ne. -1)
144
+ l = l .or. (omp_get_team_size (HUGE (zero)) .ne. -1)
151
+ if (err .ne. 0) call abort
154
===================================================================
155
--- a/src/gcc/DATESTAMP (revision
156
+++ b/src/gcc/DATESTAMP (revision
160
Index: gcc/tree-tailcall.c
161
===================================================================
162
--- a/src/gcc/tree-tailcall.c (revision
163
+++ b/src/gcc/tree-tailcall.c (revision
164
@@ -1007,6 +1007,14 @@
168
+ if (a_acc || m_acc)
170
+ /* When the tail call elimination using accumulators is performed,
171
+ statements adding the accumulated value are inserted at all exits.
172
+ This turns all other tail calls to non-tail ones. */
173
+ opt_tailcalls = false;
176
for (; tailcalls; tailcalls = next)
178
next = tailcalls->next;
180
===================================================================
181
--- a/src/gcc/ChangeLog (revision
182
+++ b/src/gcc/ChangeLog (revision
184
-2010-05-05 Ira Rosen <ira.rosen@linaro.org>
185
+2011-06-08 Kaz Kojima <kkojima@gcc.gnu.org>
187
+ Backport from mainline
188
+ 2011-06-01 Kaz Kojima <kkojima@gcc.gnu.org>
191
+ * config/sh/sh.c (expand_cbranchdi4): Use a scratch register if
192
+ needed when original operands are used for msw_skip comparison.
194
+2011-06-05 Eric Botcazou <ebotcazou@adacore.com>
196
+ * config/sparc/sparc.c (output_return): Fix thinko in the output of an
197
+ EH return when delayed branches are disabled.
199
+2011-06-05 Kaz Kojima <kkojima@gcc.gnu.org>
201
+ Backport from mainline
202
+ 2011-05-30 Kaz Kojima <kkojima@gcc.gnu.org>
205
+ * config/sh/sh.c (expand_cbranchdi4): Set msw_skip when the high
206
+ part of the second operand is 0.
208
+2011-06-04 Ira Rosen <ira.rosen@linaro.org>
210
+ PR tree-optimization/49038
211
+ * tree-vect-loop-manip.c (vect_generate_tmps_on_preheader):
212
+ Ensure at least one epilogue iteration if required by data
213
+ accesses with gaps.
214
+ * tree-vectorizer.h (struct _loop_vec_info): Add new field
215
+ to mark loops that require peeling for gaps.
216
+ * tree-vect-loop.c (new_loop_vec_info): Initialize new field.
217
+ (vect_estimate_min_profitable_iters): Take peeling for gaps into
219
+ (vect_transform_loop): Generate epilogue if required by data
221
+ * tree-vect-data-refs.c (vect_analyze_group_access): Mark the
222
+ loop as requiring an epilogue if there are gaps in the end of
225
+2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
228
+ * config/mips/mips.c (mips_cfun_call_saved_reg_p): Handle global
231
+2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
234
+ * config/mips/mips.c (mips_pic_call_symbol_from_set): Add a
235
+ recurse_p argument. Only follow register copies if it is set,
236
+ and prevent mips_find_pic_call_symbol from recursing.
237
+ (mips_find_pic_call_symbol): Add a recurse_p argument.
238
+ Pass it to mips_pic_call_symbol_from_set.
239
+ (mips_annotate_pic_calls): Update accordingly.
241
+2011-05-26 Eric Botcazou <ebotcazou@adacore.com>
243
+ * config/sparc/sparc-protos.h (sparc_optimization_options): Declare.
244
+ * config/sparc/sparc.h (OPTIMIZATION_OPTIONS): Define.
245
+ * config/sparc/sparc.c (sparc_optimization_options): New function.
246
+ Set flag_ira_share_save_slots to 0.
248
+ Backport from mainline
249
+ 2011-01-21 Jeff Law <law@redhat.com>
251
+ PR rtl-optimization/41619
252
+ * caller-save.c (setup_save_areas): Break out code to determine
253
+ which hard regs are live across calls by examining the reload chains
254
+ so that it is always used.
255
+ Eliminate code which checked REG_N_CALLS_CROSSED.
257
+2011-05-25 Uros Bizjak <ubizjak@gmail.com>
260
+ * config/i386/sse.md (sse2_loadhpd): Remove shufpd alternative.
262
+2011-05-21 Eric Botcazou <ebotcazou@adacore.com>
264
+ * config/sparc/sparc.md (setjmp): Handle PIC mode and use the hard
267
+2011-05-21 Eric Botcazou <ebotcazou@adacore.com>
269
+ * config/sparc/sparc.c (eligible_for_return_delay): Do not return
270
+ false if there are call-saved registers here...
271
+ (sparc_can_use_return_insn_p): ...but here instead.
272
+ (save_or_restore_regs): Fix thinko.
273
+ (sparc_expand_prologue): Use current_function_is_leaf.
274
+ (sparc_frame_pointer_required): Likewise.
276
+2011-05-20 Nick Clifton <nickc@redhat.com>
278
+ * config/rx/rx.h (HAVE_PRE_DECREMENT): Fix typo in macro name.
280
+2011-05-16 Uros Bizjak <ubizjak@gmail.com>
282
+ * config/i386/i386.md (*movxf_internal): Disable CONST_DOUBLE
283
+ optimization for CM_MEDIUM and CM_LARGE code models. Fix usage
284
+ of standard_80387_constant_p.
285
+ (*movxf_internal_nointeger): Ditto.
286
+ (*movdf_internal): Remove dead code-size optimization.
287
+ (*movdf_internal_rex64): Fix usage of standard_80387_constant_p.
288
+ (*movdf_internal_nointeger): Ditto.
289
+ (*movsf_internal): Ditto.
290
+ (floating point move splitters): Ditto.
291
+ * config/i386/constraints.md (G): Ditto.
292
+ * config/i386/i386.c (ix86_preferred_reload_class): Ditto.
294
+2011-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
296
+ Backport from mainline
297
+ 2011-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
299
+ PR target/48857, 48495
300
+ * config/rs6000/rs6000.h (VSX_SCALAR_MODE): Delete.
302
+ (VSX_MOVE_MODE): Ditto.
303
+ (ALTIVEC_OR_VSX_VECTOR_MODE): New macro, combine all Altivec and
304
+ VSX vector types. Add V2DImode.
305
+ (HARD_REGNO_CALLER_SAVE_MODE): Use it instead of
306
+ ALTIVEC_VECTOR_MODE and VSX_VECTOR_MODE calls.
307
+ (MODES_TIEABLE_P): Ditto.
309
+ * config/rs6000/rs6000.c (rs6000_emit_move): Use
310
+ ALTIVEC_OR_VSX_MODE instead of ALTIVEC_VECTOR_MODE and
312
+ (init_cumulative_args): Ditto.
313
+ (rs6000_function_arg_boundary): Ditto.
314
+ (rs6000_function_arg_advance_1): Ditto.
315
+ (rs6000_function_arg): Ditto.
316
+ (rs6000_function_ok_for_sibcall): Ditto.
317
+ (emit_frame_save): Ditto.
318
+ (rs6000_function_value): Ditto.
319
+ (rs6000_libcall_value): Ditto.
321
+2011-05-10 Jakub Jelinek <jakub@redhat.com>
323
+ Backported from mainline
324
+ 2011-05-07 Zdenek Dvorak <ook@ucw.cz>
326
+ PR tree-optimization/48837
327
+ * tree-tailcall.c (tree_optimize_tail_calls_1): Do not mark tailcalls
328
+ when accumulator transformation is performed.
330
+2011-05-09 Eric Botcazou <ebotcazou@adacore.com>
332
+ * var-tracking.c (find_mem_expr_in_1pdv): Fix thinko.
333
+ (dataflow_set_preserve_mem_locs): Likewise.
335
+2011-05-07 Alan Modra <amodra@gmail.com>
338
+ * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use
339
+ const0_rtx as the arg to the dummy __tls_get_addr libcall.
341
+2011-05-05 Jason Merrill <jason@redhat.com>
344
+ * tree-inline.c (copy_tree_r): Handle STATEMENT_LIST.
346
+2011-05-05 Julian Brown <julian@codesourcery.com>
348
+ * config/arm/neon.md (vec_set<mode>_internal): Fix misplaced
349
+ parenthesis in D-register case.
351
+2011-05-05 Ira Rosen <ira.rosen@linaro.org>
353
Backport from mainline:
354
2011-04-18 Ulrich Weigand <ulrich.weigand@linaro.org>
355
Ira Rosen <ira.rosen@linaro.org>
356
Index: gcc/tree-vect-loop-manip.c
357
===================================================================
358
--- a/src/gcc/tree-vect-loop-manip.c (revision
359
+++ b/src/gcc/tree-vect-loop-manip.c (revision
360
@@ -1516,7 +1516,7 @@
365
+ tree ni_name, ni_minus_gap_name;
368
tree ratio_mult_vf_name;
369
@@ -1533,9 +1533,39 @@
370
ni_name = vect_build_loop_niters (loop_vinfo, cond_expr_stmt_list);
371
log_vf = build_int_cst (TREE_TYPE (ni), exact_log2 (vf));
373
+ /* If epilogue loop is required because of data accesses with gaps, we
374
+ subtract one iteration from the total number of iterations here for
375
+ correct calculation of RATIO. */
376
+ if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
378
+ ni_minus_gap_name = fold_build2 (MINUS_EXPR, TREE_TYPE (ni_name),
380
+ build_one_cst (TREE_TYPE (ni_name)));
381
+ if (!is_gimple_val (ni_minus_gap_name))
383
+ var = create_tmp_var (TREE_TYPE (ni), "ni_gap");
384
+ add_referenced_var (var);
387
+ ni_minus_gap_name = force_gimple_operand (ni_minus_gap_name, &stmts,
389
+ if (cond_expr_stmt_list)
390
+ gimple_seq_add_seq (&cond_expr_stmt_list, stmts);
393
+ pe = loop_preheader_edge (loop);
394
+ new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
395
+ gcc_assert (!new_bb);
400
+ ni_minus_gap_name = ni_name;
402
/* Create: ratio = ni >> log2(vf) */
404
- ratio_name = fold_build2 (RSHIFT_EXPR, TREE_TYPE (ni_name), ni_name, log_vf);
405
+ ratio_name = fold_build2 (RSHIFT_EXPR, TREE_TYPE (ni_minus_gap_name),
406
+ ni_minus_gap_name, log_vf);
407
if (!is_gimple_val (ratio_name))
409
var = create_tmp_var (TREE_TYPE (ni), "bnd");
410
Index: gcc/testsuite/gcc.c-torture/execute/960321-1.x
411
===================================================================
412
--- a/src/gcc/testsuite/gcc.c-torture/execute/960321-1.x (revision
413
+++ b/src/gcc/testsuite/gcc.c-torture/execute/960321-1.x (revision
415
-# This test fails to link on 64-bit Solaris 2/x86 due to a Sun as bug.
416
-if { [istarget "i?86-*-solaris2*"]
417
- && ! [check_effective_target_ilp32]
418
- && ! [check_effective_target_gas] } {
419
- set torture_eval_before_compile {
420
- global compiler_conditional_xfail_data
421
- set compiler_conditional_xfail_data {
422
- "64-bit Sun as bug" \
423
- { "i?86-*-solaris2*" } \
430
Index: gcc/testsuite/gcc.c-torture/execute/pr49186.c
431
===================================================================
432
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr49186.c (revision
433
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr49186.c (revision
435
+/* PR target/49186 */
436
+extern void abort (void);
442
+ unsigned long long uv = 0x1000000001ULL;
444
+ x = (uv < 0x80) ? 1 : ((uv < 0x800) ? 2 : 3);
450
Index: gcc/testsuite/gcc.c-torture/compile/pr49238.c
451
===================================================================
452
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr49238.c (revision
453
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr49238.c (revision
455
+/* PR target/49238 */
456
+extern int bar (void);
459
+foo (unsigned long long a, int b)
464
+ for (a = -12; a >= 10; a = bar ())
469
+ for (i = 0; i < 10; i += 10)
470
+ if ((i == bar ()) | (bar () >= a))
473
Index: gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c
474
===================================================================
475
--- a/src/gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c (revision
476
+++ b/src/gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c (revision
478
+/* Test the `vset_lane_s8' ARM Neon intrinsic. */
481
+/* { dg-require-effective-target arm_neon_hw } */
482
+/* { dg-options "-O0" } */
483
+/* { dg-add-options arm_neon } */
485
+#include "arm_neon.h"
489
+int8x8_t x = { 1, 2, 3, 4, 5, 6, 7, 8 };
490
+int8x8_t y = { 1, 2, 3, 16, 5, 6, 7, 8 };
494
+ x = vset_lane_s8 (16, x, 3);
495
+ if (memcmp (&x, &y, sizeof (x)) != 0)
499
Index: gcc/testsuite/gcc.target/powerpc/pr48857.c
500
===================================================================
501
--- a/src/gcc/testsuite/gcc.target/powerpc/pr48857.c (revision
502
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr48857.c (revision
504
+/* { dg-do compile { target { powerpc*-*-* } } } */
505
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
506
+/* { dg-require-effective-target powerpc_vsx_ok } */
507
+/* { dg-options "-O2 -mcpu=power7 -mabi=altivec" } */
508
+/* { dg-final { scan-assembler-times "lxvd2x" 1 } } */
509
+/* { dg-final { scan-assembler-times "stxvd2x" 1 } } */
510
+/* { dg-final { scan-assembler-not "ld" } } */
511
+/* { dg-final { scan-assembler-not "lwz" } } */
512
+/* { dg-final { scan-assembler-not "stw" } } */
513
+/* { dg-final { scan-assembler-not "addi" } } */
515
+typedef vector long long v2di_type;
518
+return_v2di (v2di_type *ptr)
520
+ return *ptr; /* should generate lxvd2x 34,0,3. */
524
+pass_v2di (v2di_type arg, v2di_type *ptr)
526
+ *ptr = arg; /* should generate stxvd2x 34,0,{3,5}. */
529
Index: gcc/testsuite/gcc.target/mips/reg-var-1.c
530
===================================================================
531
--- a/src/gcc/testsuite/gcc.target/mips/reg-var-1.c (revision
532
+++ b/src/gcc/testsuite/gcc.target/mips/reg-var-1.c (revision
535
+register int g asm ("$18");
537
+void __attribute__((noinline))
550
Index: gcc/testsuite/gcc.dg/pr48837.c
551
===================================================================
552
--- a/src/gcc/testsuite/gcc.dg/pr48837.c (revision
553
+++ b/src/gcc/testsuite/gcc.dg/pr48837.c (revision
555
+/* PR tree-optimization/48837 */
557
+/* { dg-options "-O2" } */
561
+__attribute__((noinline))
567
+inline const int *bar(const int *a, const int *b)
572
+int foo(int a, int b)
574
+ return a || b ? baz() : foo(*bar(&a, &b), 1) + foo(1, 0);
579
+ if (foo(0, 0) != 2)
585
Index: gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c
586
===================================================================
587
--- a/src/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c (revision
588
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c (revision
590
+/* { dg-require-effective-target vect_int } */
594
+#include "tree-vect.h"
609
+__attribute__ ((noinline)) int
610
+main1 (s *arr, int n)
617
+ for (i = 0; i < N; i++)
627
+ __asm__ volatile ("");
630
+ /* Check peeling for gaps for unknown loop bound. */
631
+ for (i = 0; i < n; i++)
633
+ res[i].c = ptr->b + ptr->c;
634
+ x = ptr->c + ptr->f;
635
+ res[i].a = x + ptr->b;
636
+ res[i].d = ptr->b + ptr->c;
638
+ res[i].f = ptr->f + ptr->e;
639
+ res[i].e = ptr->b + ptr->e;
641
+ res[i].g = ptr->b + ptr->c;
645
+ /* check results: */
646
+ for (i = 0; i < n; i++)
648
+ if (res[i].c != arr[i].b + arr[i].c
649
+ || res[i].a != arr[i].c + arr[i].f + arr[i].b
650
+ || res[i].d != arr[i].b + arr[i].c
651
+ || res[i].b != arr[i].c
652
+ || res[i].f != arr[i].f + arr[i].e
653
+ || res[i].e != arr[i].b + arr[i].e
654
+ || res[i].h != arr[i].c
655
+ || res[i].g != arr[i].b + arr[i].c)
659
+ /* Check also that we don't do more iterations than needed. */
660
+ for (i = n; i < N; i++)
662
+ if (res[i].c == arr[i].b + arr[i].c
663
+ || res[i].a == arr[i].c + arr[i].f + arr[i].b
664
+ || res[i].d == arr[i].b + arr[i].c
665
+ || res[i].b == arr[i].c
666
+ || res[i].f == arr[i].f + arr[i].e
667
+ || res[i].e == arr[i].b + arr[i].e
668
+ || res[i].h == arr[i].c
669
+ || res[i].g == arr[i].b + arr[i].c)
684
+ for (i = 0; i < N; i++)
694
+ if (arr[i].a == 178)
703
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd } } } } */
704
+/* { dg-final { cleanup-tree-dump "vect" } } */
706
Index: gcc/testsuite/gcc.dg/vect/pr49038.c
707
===================================================================
708
--- a/src/gcc/testsuite/gcc.dg/vect/pr49038.c (revision
709
+++ b/src/gcc/testsuite/gcc.dg/vect/pr49038.c (revision
711
+#include <sys/mman.h>
715
+#define MMAP_SIZE 0x10000
716
+#define ADDRESS 0x1122000000
717
+#define TYPE unsigned short
719
+#ifndef MAP_ANONYMOUS
720
+#define MAP_ANONYMOUS MAP_ANON
723
+void __attribute__((noinline))
724
+foo (TYPE *__restrict a, TYPE *__restrict b)
728
+ for (n = 0; n < COUNT; n++)
738
+ x = mmap ((void *) ADDRESS, MMAP_SIZE, PROT_READ | PROT_WRITE,
739
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
740
+ if (x == MAP_FAILED)
746
+ b_offset = MMAP_SIZE - (2 * COUNT - 1) * sizeof (TYPE);
747
+ foo ((unsigned short *) x,
748
+ (unsigned short *) ((char *) x + b_offset));
752
+/* { dg-final { cleanup-tree-dump "vect" } } */
753
Index: gcc/testsuite/ChangeLog
754
===================================================================
755
--- a/src/gcc/testsuite/ChangeLog (revision
756
+++ b/src/gcc/testsuite/ChangeLog (revision
758
-2010-05-05 Ira Rosen <ira.rosen@linaro.org>
759
+2011-06-08 Kaz Kojima <kkojima@gcc.gnu.org>
761
+ Backport from mainline
762
+ 2011-06-01 Kaz Kojima <kkojima@gcc.gnu.org>
765
+ * gcc.c-torture/compile/pr49238.c: New.
767
+2011-06-05 Kaz Kojima <kkojima@gcc.gnu.org>
769
+ Backport from mainline
770
+ 2011-05-30 Kaz Kojima <kkojima@gcc.gnu.org>
773
+ * gcc.c-torture/execute/pr49186.c: New.
775
+2011-06-04 Ira Rosen <ira.rosen@linaro.org>
777
+ PR tree-optimization/49038
778
+ * gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c: New test.
779
+ * gcc.dg/vect/pr49038.c: New test.
781
+2011-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
783
+ Backport from trunk
785
+ * gfortran.dg/operator_7.f90: New test case.
787
+2011-05-31 Duncan Sands <baldrick@free.fr>
789
+ Backported from 4.6 branch
790
+ 2011-03-09 Martin Jambor <mjambor@suse.cz>
792
+ PR tree-optimization/47714
793
+ * g++.dg/torture/pr47714.C: New test.
795
+2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
797
+ * gcc.target/mips/reg-var-1.c: New test.
799
+2011-05-25 Uros Bizjak <ubizjak@gmail.com>
802
+ * g++.dg/other/pr49133.C: New test.
804
+2011-05-20 Jason Merrill <jason@redhat.com>
806
+ * g++.dg/init/new32.C: New.
808
+2011-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
810
+ * gcc.c-torture/execute/960321-1.x: Remove.
812
+2011-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
814
+ Backport from mainline
815
+ 2011-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
818
+ * gcc.target/powerpc/pr48857.c: New file, make sure V2DI arguments
819
+ are passed and returned in vector registers.
821
+2011-05-10 Jakub Jelinek <jakub@redhat.com>
823
+ Backported from mainline
824
+ 2011-05-07 Zdenek Dvorak <ook@ucw.cz>
826
+ PR tree-optimization/48837
827
+ * gcc.dg/pr48837.c: New testcase.
829
+2011-05-09 Jason Merrill <jason@redhat.com>
831
+ * g++.dg/template/nontype23.C: New.
833
+2011-05-05 Jason Merrill <jason@redhat.com>
835
+ * g++.dg/init/new30.C: New.
837
+2011-05-05 Julian Brown <julian@codesourcery.com>
839
+ * gcc.target/arm/neon-vset_lanes8.c: New test.
841
+2011-05-05 Ira Rosen <ira.rosen@linaro.org>
843
Backport from mainline:
844
2011-04-18 Ulrich Weigand <ulrich.weigand@linaro.org>
845
Ira Rosen <ira.rosen@linaro.org>
846
Index: gcc/testsuite/g++.dg/other/pr49133.C
847
===================================================================
848
--- a/src/gcc/testsuite/g++.dg/other/pr49133.C (revision
849
+++ b/src/gcc/testsuite/g++.dg/other/pr49133.C (revision
851
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
852
+/* { dg-options "-O2 -msse2" } */
853
+/* { dg-require-effective-target sse2 } */
854
+/* { dg-require-effective-target sse2_runtime } */
856
+#include <xmmintrin.h>
858
+extern "C" void abort ();
860
+typedef double double_a __attribute__((__may_alias__));
873
+ b = _mm_set_pd (1., 0.);
874
+ a.data = _mm_set_pd (1., 0.);
875
+ a.data = _mm_add_pd (a.data,
876
+ _mm_and_pd (_mm_cmpeq_pd (a.data, _mm_set1_pd (0.)),
877
+ _mm_set1_pd (2.)));
878
+ reinterpret_cast<double_a *>(&a.data)[1] += 1.;
879
+ b = _mm_add_pd (b, _mm_and_pd (_mm_cmpeq_pd (b, _mm_set1_pd (0.)),
880
+ _mm_set1_pd (1.)));
881
+ b = _mm_add_pd (b, _mm_and_pd (_mm_cmpeq_pd (b, _mm_set1_pd (1.)),
882
+ _mm_set1_pd (1.)));
883
+ if (_mm_movemask_pd (_mm_cmpeq_pd (a.data, b)) != 0x3)
888
Index: gcc/testsuite/g++.dg/init/new30.C
889
===================================================================
890
--- a/src/gcc/testsuite/g++.dg/init/new30.C (revision
891
+++ b/src/gcc/testsuite/g++.dg/init/new30.C (revision
897
+ // constructor required to reproduce compiler bug
903
+ // array new as default argument required to reproduce compiler bug
904
+ ptr_type (data_type* ptr = new data_type[1]) { delete[] ptr; }
908
Index: gcc/testsuite/g++.dg/init/new32.C
909
===================================================================
910
--- a/src/gcc/testsuite/g++.dg/init/new32.C (revision
911
+++ b/src/gcc/testsuite/g++.dg/init/new32.C (revision
927
+ D* dp = new (((void*) 0)) D(create<D>()); // #
929
Index: gcc/testsuite/g++.dg/torture/pr47714.C
930
===================================================================
931
--- a/src/gcc/testsuite/g++.dg/torture/pr47714.C (revision
932
+++ b/src/gcc/testsuite/g++.dg/torture/pr47714.C (revision
934
+struct A { virtual ~A () {} };
935
+struct B { virtual ~B () {} };
936
+struct C { virtual const A *foo (int) const = 0; };
937
+struct E : public B, public A { };
940
+ virtual const E *foo (int) const;
945
+F::foo (int x) const
950
Index: gcc/testsuite/g++.dg/template/nontype23.C
951
===================================================================
952
--- a/src/gcc/testsuite/g++.dg/template/nontype23.C (revision
953
+++ b/src/gcc/testsuite/g++.dg/template/nontype23.C (revision
957
+template <bool C> int foo (void);
958
+template <class T> struct S
960
+ static const unsigned int a = sizeof (T);
961
+ enum { c = sizeof (foo <(a == 0)> ()) };
964
Index: gcc/testsuite/gfortran.dg/operator_7.f90
965
===================================================================
966
--- a/src/gcc/testsuite/gfortran.dg/operator_7.f90 (revision
967
+++ b/src/gcc/testsuite/gfortran.dg/operator_7.f90 (revision
970
+! PR fortran/45786 - operators were not correctly marked as public
971
+! if the alternative form was used.
972
+! Test case contributed by Neil Carlson.
975
+ public :: foo, operator(==)
979
+ interface operator(.eq.)
980
+ module procedure eq_foo
983
+ logical function eq_foo (a, b)
984
+ type(foo), intent(in) :: a, b
985
+ eq_foo = (a%bar == b%bar)
989
+ subroutine use_it (a, b)
995
+! { dg-final { cleanup-modules "foo_type" } }
996
Index: gcc/cp/method.c
997
===================================================================
998
--- a/src/gcc/cp/method.c (revision
999
+++ b/src/gcc/cp/method.c (revision
1001
DECL_CONTEXT (x) = thunk_fndecl;
1002
SET_DECL_RTL (x, NULL_RTX);
1003
DECL_HAS_VALUE_EXPR_P (x) = 0;
1004
+ TREE_ADDRESSABLE (x) = 0;
1008
Index: gcc/cp/tree.c
1009
===================================================================
1010
--- a/src/gcc/cp/tree.c (revision
1011
+++ b/src/gcc/cp/tree.c (revision
1012
@@ -2954,7 +2954,8 @@
1013
if (!TREE_SIDE_EFFECTS (exp))
1014
init_expr = NULL_TREE;
1015
else if (!real_lvalue_p (exp)
1016
- || !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (exp)))
1017
+ || (!TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (exp))
1018
+ && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (exp))))
1020
init_expr = get_target_expr (exp);
1021
exp = TARGET_EXPR_SLOT (init_expr);
1022
Index: gcc/cp/ChangeLog
1023
===================================================================
1024
--- a/src/gcc/cp/ChangeLog (revision
1025
+++ b/src/gcc/cp/ChangeLog (revision
1027
+2011-05-31 Duncan Sands <baldrick@free.fr>
1029
+ Backported from 4.6 branch
1030
+ 2011-03-09 Martin Jambor <mjambor@suse.cz>
1032
+ PR tree-optimization/47714
1033
+ * method.c (use_thunk): Clear addressable flag of thunk arguments.
1035
+2011-05-20 Jason Merrill <jason@redhat.com>
1038
+ * tree.c (stabilize_expr): Don't make gratuitous copies of classes.
1040
+2011-05-09 Jason Merrill <jason@redhat.com>
1043
+ * decl2.c (mark_used): Instantiate constant variables even
1044
+ in unevaluated context.
1046
2011-04-27 Jason Merrill <jason@redhat.com>
1049
Index: gcc/cp/decl2.c
1050
===================================================================
1051
--- a/src/gcc/cp/decl2.c (revision
1052
+++ b/src/gcc/cp/decl2.c (revision
1053
@@ -3991,8 +3991,6 @@
1055
mark_used (tree decl)
1057
- HOST_WIDE_INT saved_processing_template_decl = 0;
1059
/* If DECL is a BASELINK for a single function, then treat it just
1060
like the DECL for the function. Otherwise, if the BASELINK is
1061
for an overloaded function, we don't know which function was
1062
@@ -4029,9 +4027,6 @@
1063
error ("used here");
1066
- /* If we don't need a value, then we don't need to synthesize DECL. */
1067
- if (cp_unevaluated_operand != 0)
1070
/* We can only check DECL_ODR_USED on variables or functions with
1071
DECL_LANG_SPECIFIC set, and these are also the only decls that we
1072
@@ -4059,9 +4054,10 @@
1073
DECL. However, if DECL is a static data member initialized with
1074
a constant, we need the value right now because a reference to
1075
such a data member is not value-dependent. */
1076
- if (TREE_CODE (decl) == VAR_DECL
1077
- && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)
1078
- && DECL_CLASS_SCOPE_P (decl))
1079
+ if (DECL_INTEGRAL_CONSTANT_VAR_P (decl)
1080
+ && !DECL_INITIAL (decl)
1081
+ && DECL_LANG_SPECIFIC (decl)
1082
+ && DECL_TEMPLATE_INSTANTIATION (decl))
1084
/* Don't try to instantiate members of dependent types. We
1085
cannot just use dependent_type_p here because this function
1086
@@ -4071,12 +4067,14 @@
1087
if (CLASSTYPE_TEMPLATE_INFO ((DECL_CONTEXT (decl)))
1088
&& uses_template_parms (CLASSTYPE_TI_ARGS (DECL_CONTEXT (decl))))
1090
- /* Pretend that we are not in a template, even if we are, so
1091
- that the static data member initializer will be processed. */
1092
- saved_processing_template_decl = processing_template_decl;
1093
- processing_template_decl = 0;
1094
+ instantiate_decl (decl, /*defer_ok=*/false,
1095
+ /*expl_inst_class_mem_p=*/false);
1098
+ /* If we don't need a value, then we don't need to synthesize DECL. */
1099
+ if (cp_unevaluated_operand != 0)
1102
if (processing_template_decl)
1105
@@ -4149,8 +4147,6 @@
1106
need. Therefore, we always try to defer instantiation. */
1107
instantiate_decl (decl, /*defer_ok=*/true,
1108
/*expl_inst_class_mem_p=*/false);
1110
- processing_template_decl = saved_processing_template_decl;
1113
#include "gt-cp-decl2.h"
1114
Index: gcc/caller-save.c
1115
===================================================================
1116
--- a/src/gcc/caller-save.c (revision
1117
+++ b/src/gcc/caller-save.c (revision
1118
@@ -439,101 +439,93 @@
1120
setup_save_areas (void)
1124
+ int i, j, k, freq;
1125
HARD_REG_SET hard_regs_used;
1126
+ struct saved_hard_reg *saved_reg;
1128
+ struct insn_chain *chain, *next;
1129
+ unsigned int regno;
1130
+ HARD_REG_SET hard_regs_to_save, used_regs, this_insn_sets;
1131
+ reg_set_iterator rsi;
1133
- /* Allocate space in the save area for the largest multi-register
1134
- pseudos first, then work backwards to single register
1137
- /* Find and record all call-used hard-registers in this function. */
1138
CLEAR_HARD_REG_SET (hard_regs_used);
1139
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
1140
- if (reg_renumber[i] >= 0 && REG_N_CALLS_CROSSED (i) > 0)
1142
- unsigned int regno = reg_renumber[i];
1143
- unsigned int endregno
1144
- = end_hard_regno (GET_MODE (regno_reg_rtx[i]), regno);
1145
- for (r = regno; r < endregno; r++)
1146
- if (call_used_regs[r])
1147
- SET_HARD_REG_BIT (hard_regs_used, r);
1150
- if (optimize && flag_ira_share_save_slots)
1151
+ /* Find every CALL_INSN and record which hard regs are live across the
1152
+ call into HARD_REG_MAP and HARD_REGS_USED. */
1153
+ initiate_saved_hard_regs ();
1154
+ /* Create hard reg saved regs. */
1155
+ for (chain = reload_insn_chain; chain != 0; chain = next)
1158
- struct insn_chain *chain, *next;
1159
- char *saved_reg_conflicts;
1160
- unsigned int regno;
1162
- struct saved_hard_reg *saved_reg, *saved_reg2, *saved_reg3;
1163
- int call_saved_regs_num;
1164
- struct saved_hard_reg *call_saved_regs[FIRST_PSEUDO_REGISTER];
1165
- HARD_REG_SET hard_regs_to_save, used_regs, this_insn_sets;
1166
- reg_set_iterator rsi;
1167
- int best_slot_num;
1168
- int prev_save_slots_num;
1169
- rtx prev_save_slots[FIRST_PSEUDO_REGISTER];
1170
+ insn = chain->insn;
1171
+ next = chain->next;
1172
+ if (!CALL_P (insn)
1173
+ || find_reg_note (insn, REG_NORETURN, NULL))
1175
+ freq = REG_FREQ_FROM_BB (BLOCK_FOR_INSN (insn));
1176
+ REG_SET_TO_HARD_REG_SET (hard_regs_to_save,
1177
+ &chain->live_throughout);
1178
+ COPY_HARD_REG_SET (used_regs, call_used_reg_set);
1180
- initiate_saved_hard_regs ();
1181
- /* Create hard reg saved regs. */
1182
- for (chain = reload_insn_chain; chain != 0; chain = next)
1183
+ /* Record all registers set in this call insn. These don't
1184
+ need to be saved. N.B. the call insn might set a subreg
1185
+ of a multi-hard-reg pseudo; then the pseudo is considered
1186
+ live during the call, but the subreg that is set
1188
+ CLEAR_HARD_REG_SET (this_insn_sets);
1189
+ note_stores (PATTERN (insn), mark_set_regs, &this_insn_sets);
1190
+ /* Sibcalls are considered to set the return value. */
1191
+ if (SIBLING_CALL_P (insn) && crtl->return_rtx)
1192
+ mark_set_regs (crtl->return_rtx, NULL_RTX, &this_insn_sets);
1194
+ AND_COMPL_HARD_REG_SET (used_regs, call_fixed_reg_set);
1195
+ AND_COMPL_HARD_REG_SET (used_regs, this_insn_sets);
1196
+ AND_HARD_REG_SET (hard_regs_to_save, used_regs);
1197
+ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
1198
+ if (TEST_HARD_REG_BIT (hard_regs_to_save, regno))
1200
+ if (hard_reg_map[regno] != NULL)
1201
+ hard_reg_map[regno]->call_freq += freq;
1203
+ saved_reg = new_saved_hard_reg (regno, freq);
1204
+ SET_HARD_REG_BIT (hard_regs_used, regno);
1206
+ /* Look through all live pseudos, mark their hard registers. */
1207
+ EXECUTE_IF_SET_IN_REG_SET
1208
+ (&chain->live_throughout, FIRST_PSEUDO_REGISTER, regno, rsi)
1210
- insn = chain->insn;
1211
- next = chain->next;
1212
- if (!CALL_P (insn)
1213
- || find_reg_note (insn, REG_NORETURN, NULL))
1214
+ int r = reg_renumber[regno];
1219
- freq = REG_FREQ_FROM_BB (BLOCK_FOR_INSN (insn));
1220
- REG_SET_TO_HARD_REG_SET (hard_regs_to_save,
1221
- &chain->live_throughout);
1222
- COPY_HARD_REG_SET (used_regs, call_used_reg_set);
1224
- /* Record all registers set in this call insn. These don't
1225
- need to be saved. N.B. the call insn might set a subreg
1226
- of a multi-hard-reg pseudo; then the pseudo is considered
1227
- live during the call, but the subreg that is set
1229
- CLEAR_HARD_REG_SET (this_insn_sets);
1230
- note_stores (PATTERN (insn), mark_set_regs, &this_insn_sets);
1231
- /* Sibcalls are considered to set the return value. */
1232
- if (SIBLING_CALL_P (insn) && crtl->return_rtx)
1233
- mark_set_regs (crtl->return_rtx, NULL_RTX, &this_insn_sets);
1235
- AND_COMPL_HARD_REG_SET (used_regs, call_fixed_reg_set);
1236
- AND_COMPL_HARD_REG_SET (used_regs, this_insn_sets);
1237
- AND_HARD_REG_SET (hard_regs_to_save, used_regs);
1238
- for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
1239
- if (TEST_HARD_REG_BIT (hard_regs_to_save, regno))
1240
+ bound = r + hard_regno_nregs[r][PSEUDO_REGNO_MODE (regno)];
1241
+ for (; r < bound; r++)
1242
+ if (TEST_HARD_REG_BIT (used_regs, r))
1244
- if (hard_reg_map[regno] != NULL)
1245
- hard_reg_map[regno]->call_freq += freq;
1246
+ if (hard_reg_map[r] != NULL)
1247
+ hard_reg_map[r]->call_freq += freq;
1249
- saved_reg = new_saved_hard_reg (regno, freq);
1250
+ saved_reg = new_saved_hard_reg (r, freq);
1251
+ SET_HARD_REG_BIT (hard_regs_to_save, r);
1252
+ SET_HARD_REG_BIT (hard_regs_used, r);
1254
- /* Look through all live pseudos, mark their hard registers. */
1255
- EXECUTE_IF_SET_IN_REG_SET
1256
- (&chain->live_throughout, FIRST_PSEUDO_REGISTER, regno, rsi)
1258
- int r = reg_renumber[regno];
1265
+ /* If requested, figure out which hard regs can share save slots. */
1266
+ if (optimize && flag_ira_share_save_slots)
1269
+ char *saved_reg_conflicts;
1271
+ struct saved_hard_reg *saved_reg2, *saved_reg3;
1272
+ int call_saved_regs_num;
1273
+ struct saved_hard_reg *call_saved_regs[FIRST_PSEUDO_REGISTER];
1274
+ int best_slot_num;
1275
+ int prev_save_slots_num;
1276
+ rtx prev_save_slots[FIRST_PSEUDO_REGISTER];
1278
- bound = r + hard_regno_nregs[r][PSEUDO_REGNO_MODE (regno)];
1279
- for (; r < bound; r++)
1280
- if (TEST_HARD_REG_BIT (used_regs, r))
1282
- if (hard_reg_map[r] != NULL)
1283
- hard_reg_map[r]->call_freq += freq;
1285
- saved_reg = new_saved_hard_reg (r, freq);
1286
- SET_HARD_REG_BIT (hard_regs_to_save, r);
1290
/* Find saved hard register conflicts. */
1291
saved_reg_conflicts = (char *) xmalloc (saved_regs_num * saved_regs_num);
1292
memset (saved_reg_conflicts, 0, saved_regs_num * saved_regs_num);
1293
@@ -691,8 +683,10 @@
1297
- /* Now run through all the call-used hard-registers and allocate
1298
- space for them in the caller-save area. Try to allocate space
1299
+ /* We are not sharing slots.
1301
+ Run through all the call-used hard-registers and allocate
1302
+ space for each in the caller-save area. Try to allocate space
1303
in a manner which allows multi-register saves/restores to be done. */
1305
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
1306
Index: gcc/fortran/interface.c
1307
===================================================================
1308
--- a/src/gcc/fortran/interface.c (revision
1309
+++ b/src/gcc/fortran/interface.c (revision
1310
@@ -1213,7 +1213,55 @@
1314
+/* Given an intrinsic op, return an equivalent op if one exists,
1315
+ or INTRINSIC_NONE otherwise. */
1318
+gfc_equivalent_op (gfc_intrinsic_op op)
1322
+ case INTRINSIC_EQ:
1323
+ return INTRINSIC_EQ_OS;
1325
+ case INTRINSIC_EQ_OS:
1326
+ return INTRINSIC_EQ;
1328
+ case INTRINSIC_NE:
1329
+ return INTRINSIC_NE_OS;
1331
+ case INTRINSIC_NE_OS:
1332
+ return INTRINSIC_NE;
1334
+ case INTRINSIC_GT:
1335
+ return INTRINSIC_GT_OS;
1337
+ case INTRINSIC_GT_OS:
1338
+ return INTRINSIC_GT;
1340
+ case INTRINSIC_GE:
1341
+ return INTRINSIC_GE_OS;
1343
+ case INTRINSIC_GE_OS:
1344
+ return INTRINSIC_GE;
1346
+ case INTRINSIC_LT:
1347
+ return INTRINSIC_LT_OS;
1349
+ case INTRINSIC_LT_OS:
1350
+ return INTRINSIC_LT;
1352
+ case INTRINSIC_LE:
1353
+ return INTRINSIC_LE_OS;
1355
+ case INTRINSIC_LE_OS:
1356
+ return INTRINSIC_LE;
1359
+ return INTRINSIC_NONE;
1363
/* For the namespace, check generic, user operator and intrinsic
1364
operator interfaces for consistency and to remove duplicate
1365
interfaces. We traverse the whole namespace, counting on the fact
1366
@@ -1253,75 +1301,19 @@
1368
for (ns2 = ns; ns2; ns2 = ns2->parent)
1370
+ gfc_intrinsic_op other_op;
1372
if (check_interface1 (ns->op[i], ns2->op[i], 0,
1373
interface_name, true))
1378
- case INTRINSIC_EQ:
1379
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_EQ_OS],
1380
- 0, interface_name, true)) goto done;
1383
- case INTRINSIC_EQ_OS:
1384
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_EQ],
1385
- 0, interface_name, true)) goto done;
1388
- case INTRINSIC_NE:
1389
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_NE_OS],
1390
- 0, interface_name, true)) goto done;
1393
- case INTRINSIC_NE_OS:
1394
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_NE],
1395
- 0, interface_name, true)) goto done;
1398
- case INTRINSIC_GT:
1399
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GT_OS],
1400
- 0, interface_name, true)) goto done;
1403
- case INTRINSIC_GT_OS:
1404
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GT],
1405
- 0, interface_name, true)) goto done;
1408
- case INTRINSIC_GE:
1409
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GE_OS],
1410
- 0, interface_name, true)) goto done;
1413
- case INTRINSIC_GE_OS:
1414
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GE],
1415
- 0, interface_name, true)) goto done;
1418
- case INTRINSIC_LT:
1419
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LT_OS],
1420
- 0, interface_name, true)) goto done;
1423
- case INTRINSIC_LT_OS:
1424
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LT],
1425
- 0, interface_name, true)) goto done;
1428
- case INTRINSIC_LE:
1429
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LE_OS],
1430
- 0, interface_name, true)) goto done;
1433
- case INTRINSIC_LE_OS:
1434
- if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LE],
1435
- 0, interface_name, true)) goto done;
1441
+ /* i should be gfc_intrinsic_op, but has to be int with this cast
1442
+ here for stupid C++ compatibility rules. */
1443
+ other_op = gfc_equivalent_op ((gfc_intrinsic_op) i);
1444
+ if (other_op != INTRINSIC_NONE
1445
+ && check_interface1 (ns->op[i], ns2->op[other_op],
1446
+ 0, interface_name, true))
1451
Index: gcc/fortran/decl.c
1452
===================================================================
1453
--- a/src/gcc/fortran/decl.c (revision
1454
+++ b/src/gcc/fortran/decl.c (revision
1455
@@ -6062,8 +6062,19 @@
1456
case INTERFACE_INTRINSIC_OP:
1457
if (gfc_current_ns->operator_access[op] == ACCESS_UNKNOWN)
1459
+ gfc_intrinsic_op other_op;
1461
gfc_current_ns->operator_access[op] =
1462
(st == ST_PUBLIC) ? ACCESS_PUBLIC : ACCESS_PRIVATE;
1464
+ /* Handle the case if there is another op with the same
1465
+ function, for INTRINSIC_EQ vs. INTRINSIC_EQ_OS and so on. */
1466
+ other_op = gfc_equivalent_op (op);
1468
+ if (other_op != INTRINSIC_NONE)
1469
+ gfc_current_ns->operator_access[other_op] =
1470
+ (st == ST_PUBLIC) ? ACCESS_PUBLIC : ACCESS_PRIVATE;
1475
Index: gcc/fortran/gfortran.h
1476
===================================================================
1477
--- a/src/gcc/fortran/gfortran.h (revision
1478
+++ b/src/gcc/fortran/gfortran.h (revision
1479
@@ -2718,6 +2718,7 @@
1480
gfc_symtree* gfc_find_sym_in_symtree (gfc_symbol*);
1481
bool gfc_arglist_matches_symbol (gfc_actual_arglist**, gfc_symbol*);
1482
bool gfc_check_operator_interface (gfc_symbol*, gfc_intrinsic_op, locus);
1483
+gfc_intrinsic_op gfc_equivalent_op (gfc_intrinsic_op);
1486
extern gfc_st_label format_asterisk;
1487
Index: gcc/fortran/ChangeLog
1488
===================================================================
1489
--- a/src/gcc/fortran/ChangeLog (revision
1490
+++ b/src/gcc/fortran/ChangeLog (revision
1492
+2011-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1494
+ Backport from trunk
1496
+ * interface.c (gfc_equivalent_op): New function.
1497
+ (gfc_check_interface): Use gfc_equivalent_op instead
1498
+ of switch statement.
1499
+ * decl.c (access_attr_decl): Also set access to an
1500
+ equivalent operator.
1502
2011-04-28 Release Manager
1504
* GCC 4.5.3 released.
1505
Index: gcc/tree-vectorizer.h
1506
===================================================================
1507
--- a/src/gcc/tree-vectorizer.h (revision
1508
+++ b/src/gcc/tree-vectorizer.h (revision
1509
@@ -242,6 +242,12 @@
1510
/* The unrolling factor needed to SLP the loop. In case of that pure SLP is
1511
applied to the loop, i.e., no unrolling is needed, this is 1. */
1512
unsigned slp_unrolling_factor;
1514
+ /* When we have strided data accesses with gaps, we may introduce invalid
1515
+ memory accesses. We peel the last iteration of the loop to prevent
1517
+ bool peeling_for_gaps;
1521
/* Access Functions. */
1523
#define LOOP_VINFO_STRIDED_STORES(L) (L)->strided_stores
1524
#define LOOP_VINFO_SLP_INSTANCES(L) (L)->slp_instances
1525
#define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor
1526
+#define LOOP_VINFO_PEELING_FOR_GAPS(L) (L)->peeling_for_gaps
1528
#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
1529
VEC_length (gimple, (L)->may_misalign_stmts) > 0
1530
Index: gcc/tree-vect-loop.c
1531
===================================================================
1532
--- a/src/gcc/tree-vect-loop.c (revision
1533
+++ b/src/gcc/tree-vect-loop.c (revision
1535
LOOP_VINFO_STRIDED_STORES (res) = VEC_alloc (gimple, heap, 10);
1536
LOOP_VINFO_SLP_INSTANCES (res) = VEC_alloc (slp_instance, heap, 10);
1537
LOOP_VINFO_SLP_UNROLLING_FACTOR (res) = 1;
1538
+ LOOP_VINFO_PEELING_FOR_GAPS (res) = false;
1542
@@ -2053,6 +2054,10 @@
1543
peel_iters_prologue = niters < peel_iters_prologue ?
1544
niters : peel_iters_prologue;
1545
peel_iters_epilogue = (niters - peel_iters_prologue) % vf;
1546
+ /* If we need to peel for gaps, but no peeling is required, we have
1547
+ to peel VF iterations. */
1548
+ if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) && !peel_iters_epilogue)
1549
+ peel_iters_epilogue = vf;
1553
@@ -4212,7 +4217,8 @@
1554
do_peeling_for_loop_bound
1555
= (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
1556
|| (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
1557
- && LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0));
1558
+ && LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0)
1559
+ || LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo));
1561
if (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo)
1562
|| LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo))
1563
Index: gcc/tree-vect-data-refs.c
1564
===================================================================
1565
--- a/src/gcc/tree-vect-data-refs.c (revision
1566
+++ b/src/gcc/tree-vect-data-refs.c (revision
1567
@@ -1450,7 +1450,7 @@
1568
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
1569
bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
1570
HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
1571
- HOST_WIDE_INT stride;
1572
+ HOST_WIDE_INT stride, last_accessed_element = 1;
1573
bool slp_impossible = false;
1575
/* For interleaving, STRIDE is STEP counted in elements, i.e., the size of the
1576
@@ -1479,6 +1479,16 @@
1577
fprintf (vect_dump, " step ");
1578
print_generic_expr (vect_dump, step, TDF_SLIM);
1583
+ LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true;
1585
+ if (vect_print_dump_info (REPORT_DETAILS))
1586
+ fprintf (vect_dump, "Data access with gaps requires scalar "
1592
if (vect_print_dump_info (REPORT_DETAILS))
1593
@@ -1531,6 +1541,7 @@
1594
next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
1600
/* Check that all the accesses have the same STEP. */
1601
@@ -1561,6 +1572,8 @@
1605
+ last_accessed_element += diff;
1607
/* Store the gap from the previous member of the group. If there is no
1608
gap in the access, DR_GROUP_GAP is always 1. */
1609
DR_GROUP_GAP (vinfo_for_stmt (next)) = diff;
1610
@@ -1652,6 +1665,15 @@
1611
VEC_safe_push (gimple, heap, BB_VINFO_STRIDED_STORES (bb_vinfo),
1615
+ /* There is a gap in the end of the group. */
1616
+ if (stride - last_accessed_element > 0 && loop_vinfo)
1618
+ LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true;
1619
+ if (vect_print_dump_info (REPORT_DETAILS))
1620
+ fprintf (vect_dump, "Data access with gaps requires scalar "
1626
Index: gcc/tree-inline.c
1627
===================================================================
1628
--- a/src/gcc/tree-inline.c (revision
1629
+++ b/src/gcc/tree-inline.c (revision
1630
@@ -4179,14 +4179,16 @@
1631
CONSTRUCTOR_ELTS (*tp));
1634
+ else if (code == STATEMENT_LIST)
1635
+ /* We used to just abort on STATEMENT_LIST, but we can run into them
1636
+ with statement-expressions (c++/40975). */
1637
+ copy_statement_list (tp);
1638
else if (TREE_CODE_CLASS (code) == tcc_type)
1640
else if (TREE_CODE_CLASS (code) == tcc_declaration)
1642
else if (TREE_CODE_CLASS (code) == tcc_constant)
1645
- gcc_assert (code != STATEMENT_LIST);
1649
Index: gcc/var-tracking.c
1650
===================================================================
1651
--- a/src/gcc/var-tracking.c (revision
1652
+++ b/src/gcc/var-tracking.c (revision
1653
@@ -4134,8 +4134,9 @@
1654
VALUE_RECURSED_INTO (val) = true;
1656
for (node = var->var_part[0].loc_chain; node; node = node->next)
1657
- if (MEM_P (node->loc) && MEM_EXPR (node->loc) == expr
1658
- && MEM_OFFSET (node->loc) == 0)
1659
+ if (MEM_P (node->loc)
1660
+ && MEM_EXPR (node->loc) == expr
1661
+ && INT_MEM_OFFSET (node->loc) == 0)
1665
@@ -4198,11 +4199,10 @@
1667
for (loc = var->var_part[0].loc_chain; loc; loc = loc->next)
1669
- /* We want to remove dying MEMs that doesn't refer to
1671
+ /* We want to remove dying MEMs that doesn't refer to DECL. */
1672
if (GET_CODE (loc->loc) == MEM
1673
&& (MEM_EXPR (loc->loc) != decl
1674
- || MEM_OFFSET (loc->loc))
1675
+ || INT_MEM_OFFSET (loc->loc) != 0)
1676
&& !mem_dies_at_call (loc->loc))
1678
/* We want to move here MEMs that do refer to DECL. */
1679
@@ -4246,7 +4246,7 @@
1681
if (GET_CODE (loc->loc) != MEM
1682
|| (MEM_EXPR (loc->loc) == decl
1683
- && MEM_OFFSET (loc->loc) == 0)
1684
+ && INT_MEM_OFFSET (loc->loc) == 0)
1685
|| !mem_dies_at_call (loc->loc))
1687
if (old_loc != loc->loc && emit_notes)
1688
Index: gcc/config/sparc/sparc.md
1689
===================================================================
1690
--- a/src/gcc/config/sparc/sparc.md (revision
1691
+++ b/src/gcc/config/sparc/sparc.md (revision
1692
@@ -6491,8 +6491,8 @@
1695
;; For __builtin_setjmp we need to flush register windows iff the function
1696
-;; calls alloca as well, because otherwise the register window might be
1697
-;; saved after %sp adjustment and thus setjmp would crash
1698
+;; calls alloca as well, because otherwise the current register window might
1699
+;; be saved after the %sp adjustment and thus setjmp would crash.
1700
(define_expand "builtin_setjmp_setup"
1701
[(match_operand 0 "register_operand" "r")]
1703
@@ -6531,19 +6531,26 @@
1704
(eq_attr "pic" "true")
1705
(const_int 4)] (const_int 3)))])
1707
-;; Pattern for use after a setjmp to store FP and the return register
1708
-;; into the stack area.
1709
+;; Pattern for use after a setjmp to store registers into the save area.
1711
(define_expand "setjmp"
1720
+ mem = gen_rtx_MEM (Pmode,
1721
+ plus_constant (stack_pointer_rtx,
1722
+ SPARC_STACK_BIAS + 7 * UNITS_PER_WORD));
1723
+ emit_insn (gen_rtx_SET (VOIDmode, mem, pic_offset_table_rtx));
1726
mem = gen_rtx_MEM (Pmode,
1727
plus_constant (stack_pointer_rtx,
1728
SPARC_STACK_BIAS + 14 * UNITS_PER_WORD));
1729
- emit_insn (gen_rtx_SET (VOIDmode, mem, frame_pointer_rtx));
1730
+ emit_insn (gen_rtx_SET (VOIDmode, mem, hard_frame_pointer_rtx));
1732
mem = gen_rtx_MEM (Pmode,
1733
plus_constant (stack_pointer_rtx,
1734
Index: gcc/config/sparc/sparc-protos.h
1735
===================================================================
1736
--- a/src/gcc/config/sparc/sparc-protos.h (revision
1737
+++ b/src/gcc/config/sparc/sparc-protos.h (revision
1739
extern int check_pic (int);
1740
extern int short_branch (int, int);
1741
extern void sparc_profile_hook (int);
1742
+extern void sparc_optimization_options (int, int);
1743
extern void sparc_override_options (void);
1744
extern void sparc_output_scratch_registers (FILE *);
1746
Index: gcc/config/sparc/sparc.c
1747
===================================================================
1748
--- a/src/gcc/config/sparc/sparc.c (revision
1749
+++ b/src/gcc/config/sparc/sparc.c (revision
1750
@@ -627,6 +627,17 @@
1754
+/* Specify default optimizations. */
1757
+sparc_optimization_options (int l ATTRIBUTE_UNUSED, int s ATTRIBUTE_UNUSED)
1759
+ /* Disable save slot sharing for call-clobbered registers by default.
1760
+ The IRA sharing algorithm works on single registers only and this
1761
+ pessimizes for double floating-point registers. */
1762
+ flag_ira_share_save_slots = 0;
1765
/* Validate and override various options, and do some machine dependent
1768
@@ -2767,11 +2778,6 @@
1769
if (get_attr_length (trial) != 1)
1772
- /* If there are any call-saved registers, we should scan TRIAL if it
1773
- does not reference them. For now just make it easy. */
1777
/* If the function uses __builtin_eh_return, the eh_return machinery
1778
occupies the delay slot. */
1779
if (crtl->calls_eh_return)
1780
@@ -4093,7 +4099,7 @@
1781
emit_move_insn (gen_rtx_REG (mode, regno), mem);
1783
/* Always preserve double-word alignment. */
1784
- offset = (offset + 7) & -8;
1785
+ offset = (offset + 8) & -8;
1789
@@ -4200,7 +4206,7 @@
1790
example, the regrename pass has special provisions to not rename to
1791
non-leaf registers in a leaf function. */
1792
sparc_leaf_function_p
1793
- = optimize > 0 && leaf_function_p () && only_leaf_regs_used ();
1794
+ = optimize > 0 && current_function_is_leaf && only_leaf_regs_used ();
1796
/* Need to use actual_fsize, since we are also allocating
1797
space for our callee (and our own register save area). */
1798
@@ -4324,6 +4330,7 @@
1799
sparc_can_use_return_insn_p (void)
1801
return sparc_prologue_data_valid_p
1802
+ && num_gfregs == 0
1803
&& (actual_fsize == 0 || !sparc_leaf_function_p);
1806
@@ -4425,18 +4432,20 @@
1807
machinery occupies the delay slot. */
1808
gcc_assert (! final_sequence);
1810
- if (! flag_delayed_branch)
1811
- fputs ("\tadd\t%fp, %g1, %fp\n", asm_out_file);
1812
+ if (flag_delayed_branch)
1815
+ fputs ("\treturn\t%i7+8\n", asm_out_file);
1817
+ fputs ("\trestore\n\tjmp\t%o7+8\n", asm_out_file);
1820
- fputs ("\treturn\t%i7+8\n", asm_out_file);
1821
+ fputs ("\t add\t%sp, %g1, %sp\n", asm_out_file);
1824
- fputs ("\trestore\n\tjmp\t%o7+8\n", asm_out_file);
1826
- if (flag_delayed_branch)
1827
- fputs ("\t add\t%sp, %g1, %sp\n", asm_out_file);
1829
- fputs ("\t nop\n", asm_out_file);
1831
+ fputs ("\trestore\n\tadd\t%sp, %g1, %sp\n", asm_out_file);
1832
+ fputs ("\tjmp\t%o7+8\n\t nop\n", asm_out_file);
1835
else if (final_sequence)
1837
@@ -9267,7 +9276,7 @@
1839
sparc_frame_pointer_required (void)
1841
- return !(leaf_function_p () && only_leaf_regs_used ());
1842
+ return !(current_function_is_leaf && only_leaf_regs_used ());
1845
/* The way this is structured, we can't eliminate SFP in favor of SP
1846
Index: gcc/config/sparc/sparc.h
1847
===================================================================
1848
--- a/src/gcc/config/sparc/sparc.h (revision
1849
+++ b/src/gcc/config/sparc/sparc.h (revision
1851
#define CAN_DEBUG_WITHOUT_FP
1853
/* Option handling. */
1855
+#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
1856
+ sparc_optimization_options ((LEVEL), (SIZE))
1857
#define OVERRIDE_OPTIONS sparc_override_options ()
1859
/* Mask of all CPU selection flags. */
1860
Index: gcc/config/rx/rx.h
1861
===================================================================
1862
--- a/src/gcc/config/rx/rx.h (revision
1863
+++ b/src/gcc/config/rx/rx.h (revision
1866
#define HANDLE_PRAGMA_PACK_PUSH_POP 1
1868
-#define HAVE_PRE_DECCREMENT 1
1869
+#define HAVE_PRE_DECREMENT 1
1870
#define HAVE_POST_INCREMENT 1
1872
#define MOVE_RATIO(SPEED) ((SPEED) ? 4 : 2)
1873
Index: gcc/config/i386/i386.md
1874
===================================================================
1875
--- a/src/gcc/config/i386/i386.md (revision
1876
+++ b/src/gcc/config/i386/i386.md (revision
1877
@@ -2872,7 +2872,7 @@
1878
&& (reload_in_progress || reload_completed
1879
|| (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
1880
|| (!TARGET_SSE_MATH && optimize_function_for_size_p (cfun)
1881
- && standard_80387_constant_p (operands[1]))
1882
+ && standard_80387_constant_p (operands[1]) > 0)
1883
|| GET_CODE (operands[1]) != CONST_DOUBLE
1884
|| memory_operand (operands[0], SFmode))"
1886
@@ -3043,11 +3043,10 @@
1887
|| (!(TARGET_SSE2 && TARGET_SSE_MATH)
1888
&& optimize_function_for_size_p (cfun)
1889
&& !memory_operand (operands[0], DFmode)
1890
- && standard_80387_constant_p (operands[1]))
1891
+ && standard_80387_constant_p (operands[1]) > 0)
1892
|| GET_CODE (operands[1]) != CONST_DOUBLE
1893
|| ((optimize_function_for_size_p (cfun)
1894
- || !TARGET_MEMORY_MISMATCH_STALL
1895
- || reload_in_progress || reload_completed)
1896
+ || !TARGET_MEMORY_MISMATCH_STALL)
1897
&& memory_operand (operands[0], DFmode)))"
1899
switch (which_alternative)
1900
@@ -3196,7 +3195,7 @@
1901
|| (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
1902
|| (!(TARGET_SSE2 && TARGET_SSE_MATH)
1903
&& optimize_function_for_size_p (cfun)
1904
- && standard_80387_constant_p (operands[1]))
1905
+ && standard_80387_constant_p (operands[1]) > 0)
1906
|| GET_CODE (operands[1]) != CONST_DOUBLE
1907
|| memory_operand (operands[0], DFmode))"
1909
@@ -3337,7 +3336,7 @@
1910
|| (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
1911
|| (!(TARGET_SSE2 && TARGET_SSE_MATH)
1912
&& optimize_function_for_size_p (cfun)
1913
- && standard_80387_constant_p (operands[1]))
1914
+ && standard_80387_constant_p (operands[1]) > 0)
1915
|| GET_CODE (operands[1]) != CONST_DOUBLE
1916
|| memory_operand (operands[0], DFmode))"
1918
@@ -3568,7 +3567,8 @@
1919
"optimize_function_for_size_p (cfun)
1920
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))
1921
&& (reload_in_progress || reload_completed
1922
- || standard_80387_constant_p (operands[1])
1923
+ || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
1924
+ || standard_80387_constant_p (operands[1]) > 0
1925
|| GET_CODE (operands[1]) != CONST_DOUBLE
1926
|| memory_operand (operands[0], XFmode))"
1928
@@ -3596,6 +3596,7 @@
1929
"optimize_function_for_speed_p (cfun)
1930
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))
1931
&& (reload_in_progress || reload_completed
1932
+ || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
1933
|| GET_CODE (operands[1]) != CONST_DOUBLE
1934
|| memory_operand (operands[0], XFmode))"
1936
@@ -3740,7 +3741,7 @@
1938
else if (FP_REG_P (r))
1940
- if (!standard_80387_constant_p (c))
1941
+ if (standard_80387_constant_p (c) < 1)
1944
else if (MMX_REG_P (r))
1945
@@ -3772,7 +3773,7 @@
1947
else if (FP_REG_P (r))
1949
- if (!standard_80387_constant_p (c))
1950
+ if (standard_80387_constant_p (c) < 1)
1953
else if (MMX_REG_P (r))
1954
Index: gcc/config/i386/constraints.md
1955
===================================================================
1956
--- a/src/gcc/config/i386/constraints.md (revision
1957
+++ b/src/gcc/config/i386/constraints.md (revision
1959
(define_constraint "G"
1960
"Standard 80387 floating point constant."
1961
(and (match_code "const_double")
1962
- (match_test "standard_80387_constant_p (op)")))
1963
+ (match_test "standard_80387_constant_p (op) > 0")))
1965
;; This can theoretically be any mode's CONST0_RTX.
1966
(define_constraint "C"
1967
Index: gcc/config/i386/sse.md
1968
===================================================================
1969
--- a/src/gcc/config/i386/sse.md (revision
1970
+++ b/src/gcc/config/i386/sse.md (revision
1971
@@ -4964,24 +4964,22 @@
1972
;; Avoid combining registers from different units in a single alternative,
1973
;; see comment above inline_secondary_memory_needed function in i386.c
1974
(define_insn "sse2_loadhpd"
1975
- [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,x,o,o,o")
1976
+ [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,o,o,o")
1979
- (match_operand:V2DF 1 "nonimmediate_operand" " 0,0,x,0,0,0")
1980
+ (match_operand:V2DF 1 "nonimmediate_operand" " 0,0,0,0,0")
1981
(parallel [(const_int 0)]))
1982
- (match_operand:DF 2 "nonimmediate_operand" " m,x,0,x,*f,r")))]
1983
+ (match_operand:DF 2 "nonimmediate_operand" " m,x,x,*f,r")))]
1984
"TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
1986
movhpd\t{%2, %0|%0, %2}
1987
unpcklpd\t{%2, %0|%0, %2}
1988
- shufpd\t{$1, %1, %0|%0, %1, 1}
1992
- [(set_attr "type" "ssemov,sselog,sselog,ssemov,fmov,imov")
1993
- (set_attr "prefix_data16" "1,*,*,*,*,*")
1994
- (set_attr "length_immediate" "*,*,1,*,*,*")
1995
- (set_attr "mode" "V1DF,V2DF,V2DF,DF,DF,DF")])
1996
+ [(set_attr "type" "ssemov,sselog,ssemov,fmov,imov")
1997
+ (set_attr "prefix_data16" "1,*,*,*,*")
1998
+ (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
2001
[(set (match_operand:V2DF 0 "memory_operand" "")
2002
Index: gcc/config/i386/i386.c
2003
===================================================================
2004
--- a/src/gcc/config/i386/i386.c (revision
2005
+++ b/src/gcc/config/i386/i386.c (revision
2006
@@ -25071,7 +25071,7 @@
2007
zero above. We only want to wind up preferring 80387 registers if
2008
we plan on doing computation with them. */
2010
- && standard_80387_constant_p (x))
2011
+ && standard_80387_constant_p (x) > 0)
2013
/* Limit class to non-sse. */
2014
if (regclass == FLOAT_SSE_REGS)
2015
Index: gcc/config/sh/sh.c
2016
===================================================================
2017
--- a/src/gcc/config/sh/sh.c (revision
2018
+++ b/src/gcc/config/sh/sh.c (revision
2019
@@ -1945,7 +1945,10 @@
2020
else if (op2h != CONST0_RTX (SImode))
2025
+ msw_skip = swap_condition (LTU);
2028
msw_skip = swap_condition (msw_taken);
2031
@@ -1998,6 +2001,13 @@
2035
+ if (reload_completed
2036
+ && ! arith_reg_or_0_operand (op2h, SImode)
2037
+ && (true_regnum (op1h) || (comparison != EQ && comparison != NE)))
2039
+ emit_move_insn (scratch, operands[2]);
2040
+ operands[2] = scratch;
2044
operands[3] = skip_label = gen_label_rtx ();
2045
Index: gcc/config/rs6000/rs6000.c
2046
===================================================================
2047
--- a/src/gcc/config/rs6000/rs6000.c (revision
2048
+++ b/src/gcc/config/rs6000/rs6000.c (revision
2049
@@ -5426,10 +5426,11 @@
2051
if (model == TLS_MODEL_GLOBAL_DYNAMIC)
2053
- r3 = gen_rtx_REG (Pmode, 3);
2054
tga = rs6000_tls_get_addr ();
2055
- emit_library_call_value (tga, dest, LCT_CONST, Pmode, 1, r3, Pmode);
2056
+ emit_library_call_value (tga, dest, LCT_CONST, Pmode,
2057
+ 1, const0_rtx, Pmode);
2059
+ r3 = gen_rtx_REG (Pmode, 3);
2060
if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT)
2061
insn = gen_tls_gd_aix64 (r3, got, addr, tga, const0_rtx);
2062
else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT)
2063
@@ -5446,11 +5447,12 @@
2065
else if (model == TLS_MODEL_LOCAL_DYNAMIC)
2067
- r3 = gen_rtx_REG (Pmode, 3);
2068
tga = rs6000_tls_get_addr ();
2069
tmp1 = gen_reg_rtx (Pmode);
2070
- emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, 1, r3, Pmode);
2071
+ emit_library_call_value (tga, tmp1, LCT_CONST, Pmode,
2072
+ 1, const0_rtx, Pmode);
2074
+ r3 = gen_rtx_REG (Pmode, 3);
2075
if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT)
2076
insn = gen_tls_ld_aix64 (r3, got, tga, const0_rtx);
2077
else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT)
2078
@@ -6694,7 +6696,7 @@
2080
/* Nonzero if we can use an AltiVec register to pass this arg. */
2081
#define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE,NAMED) \
2082
- ((ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE)) \
2083
+ (ALTIVEC_OR_VSX_VECTOR_MODE (MODE) \
2084
&& (CUM)->vregno <= ALTIVEC_ARG_MAX_REG \
2085
&& TARGET_ALTIVEC_ABI \
2087
@@ -6920,7 +6922,7 @@
2088
existing library interfaces.
2090
Doubleword align SPE vectors.
2091
- Quadword align Altivec vectors.
2092
+ Quadword align Altivec/VSX vectors.
2093
Quadword align large synthetic vector types. */
2096
@@ -6937,7 +6939,7 @@
2097
&& int_size_in_bytes (type) >= 8
2098
&& int_size_in_bytes (type) < 16))
2100
- else if ((ALTIVEC_VECTOR_MODE (mode) || VSX_VECTOR_MODE (mode))
2101
+ else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
2102
|| (type && TREE_CODE (type) == VECTOR_TYPE
2103
&& int_size_in_bytes (type) >= 16))
2105
@@ -7082,8 +7084,7 @@
2106
cum->nargs_prototype--;
2108
if (TARGET_ALTIVEC_ABI
2109
- && (ALTIVEC_VECTOR_MODE (mode)
2110
- || VSX_VECTOR_MODE (mode)
2111
+ && (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
2112
|| (type && TREE_CODE (type) == VECTOR_TYPE
2113
&& int_size_in_bytes (type) == 16)))
2115
@@ -7677,8 +7678,7 @@
2117
return gen_rtx_REG (mode, cum->vregno);
2118
else if (TARGET_ALTIVEC_ABI
2119
- && (ALTIVEC_VECTOR_MODE (mode)
2120
- || VSX_VECTOR_MODE (mode)
2121
+ && (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
2122
|| (type && TREE_CODE (type) == VECTOR_TYPE
2123
&& int_size_in_bytes (type) == 16)))
2125
@@ -18280,7 +18280,7 @@
2127
/* Some cases that need register indexed addressing. */
2128
if ((TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode))
2129
- || (TARGET_VSX && VSX_VECTOR_MODE (mode))
2130
+ || (TARGET_VSX && ALTIVEC_OR_VSX_VECTOR_MODE (mode))
2131
|| (TARGET_E500_DOUBLE && mode == DFmode)
2133
&& SPE_VECTOR_MODE (mode)
2134
@@ -25565,14 +25565,13 @@
2135
else if (TREE_CODE (valtype) == COMPLEX_TYPE
2136
&& targetm.calls.split_complex_arg)
2137
return rs6000_complex_function_value (mode);
2138
+ /* VSX is a superset of Altivec and adds V2DImode/V2DFmode. Since the same
2139
+ return register is used in both cases, and we won't see V2DImode/V2DFmode
2140
+ for pure altivec, combine the two cases. */
2141
else if (TREE_CODE (valtype) == VECTOR_TYPE
2142
&& TARGET_ALTIVEC && TARGET_ALTIVEC_ABI
2143
- && ALTIVEC_VECTOR_MODE (mode))
2144
+ && ALTIVEC_OR_VSX_VECTOR_MODE (mode))
2145
regno = ALTIVEC_ARG_RETURN;
2146
- else if (TREE_CODE (valtype) == VECTOR_TYPE
2147
- && TARGET_VSX && TARGET_ALTIVEC_ABI
2148
- && VSX_VECTOR_MODE (mode))
2149
- regno = ALTIVEC_ARG_RETURN;
2150
else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT
2151
&& (mode == DFmode || mode == DCmode
2152
|| mode == TFmode || mode == TCmode))
2153
@@ -25611,12 +25610,12 @@
2154
&& TARGET_HARD_FLOAT && TARGET_FPRS
2155
&& ((TARGET_SINGLE_FLOAT && mode == SFmode) || TARGET_DOUBLE_FLOAT))
2156
regno = FP_ARG_RETURN;
2157
- else if (ALTIVEC_VECTOR_MODE (mode)
2158
+ /* VSX is a superset of Altivec and adds V2DImode/V2DFmode. Since the same
2159
+ return register is used in both cases, and we won't see V2DImode/V2DFmode
2160
+ for pure altivec, combine the two cases. */
2161
+ else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
2162
&& TARGET_ALTIVEC && TARGET_ALTIVEC_ABI)
2163
regno = ALTIVEC_ARG_RETURN;
2164
- else if (VSX_VECTOR_MODE (mode)
2165
- && TARGET_VSX && TARGET_ALTIVEC_ABI)
2166
- regno = ALTIVEC_ARG_RETURN;
2167
else if (COMPLEX_MODE_P (mode) && targetm.calls.split_complex_arg)
2168
return rs6000_complex_function_value (mode);
2169
else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT
2171
Property changes on: gcc/config/rs6000/rs6000.c
2172
___________________________________________________________________
2173
Added: svn:mergeinfo
2174
Merged /trunk/gcc/config/rs6000/rs6000.c:r162404,173624
2176
Index: gcc/config/rs6000/rs6000.h
2177
===================================================================
2178
--- a/src/gcc/config/rs6000/rs6000.h (revision
2179
+++ b/src/gcc/config/rs6000/rs6000.h (revision
2180
@@ -1038,10 +1038,9 @@
2182
/* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate
2183
enough space to account for vectors in FP regs. */
2184
-#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
2186
- && ((MODE) == VOIDmode || VSX_VECTOR_MODE (MODE) \
2187
- || ALTIVEC_VECTOR_MODE (MODE)) \
2188
+#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
2190
+ && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE)) \
2191
&& FP_REGNO_P (REGNO) \
2193
: choose_hard_reg_mode ((REGNO), (NREGS), false))
2194
@@ -1057,25 +1056,16 @@
2195
((MODE) == V4SFmode \
2196
|| (MODE) == V2DFmode) \
2198
-#define VSX_SCALAR_MODE(MODE) \
2199
- ((MODE) == DFmode)
2201
-#define VSX_MODE(MODE) \
2202
- (VSX_VECTOR_MODE (MODE) \
2203
- || VSX_SCALAR_MODE (MODE))
2205
-#define VSX_MOVE_MODE(MODE) \
2206
- (VSX_VECTOR_MODE (MODE) \
2207
- || VSX_SCALAR_MODE (MODE) \
2208
- || ALTIVEC_VECTOR_MODE (MODE) \
2209
- || (MODE) == TImode)
2211
#define ALTIVEC_VECTOR_MODE(MODE) \
2212
((MODE) == V16QImode \
2213
|| (MODE) == V8HImode \
2214
|| (MODE) == V4SFmode \
2215
|| (MODE) == V4SImode)
2217
+#define ALTIVEC_OR_VSX_VECTOR_MODE(MODE) \
2218
+ (ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE) \
2219
+ || (MODE) == V2DImode)
2221
#define SPE_VECTOR_MODE(MODE) \
2222
((MODE) == V4HImode \
2223
|| (MODE) == V2SFmode \
2224
@@ -1118,10 +1108,10 @@
2225
? ALTIVEC_VECTOR_MODE (MODE2) \
2226
: ALTIVEC_VECTOR_MODE (MODE2) \
2227
? ALTIVEC_VECTOR_MODE (MODE1) \
2228
- : VSX_VECTOR_MODE (MODE1) \
2229
- ? VSX_VECTOR_MODE (MODE2) \
2230
- : VSX_VECTOR_MODE (MODE2) \
2231
- ? VSX_VECTOR_MODE (MODE1) \
2232
+ : ALTIVEC_OR_VSX_VECTOR_MODE (MODE1) \
2233
+ ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE2) \
2234
+ : ALTIVEC_OR_VSX_VECTOR_MODE (MODE2) \
2235
+ ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE1) \
2238
/* Post-reload, we can't use any new AltiVec registers, as we already
2240
Property changes on: gcc/config/rs6000/rs6000.h
2241
___________________________________________________________________
2242
Added: svn:mergeinfo
2243
Merged /trunk/gcc/config/rs6000/rs6000.h:r162404,173624
2245
Index: gcc/config/arm/neon.md
2246
===================================================================
2247
--- a/src/gcc/config/arm/neon.md (revision
2248
+++ b/src/gcc/config/arm/neon.md (revision
2250
(match_operand:SI 2 "immediate_operand" "i")))]
2253
- int elt = ffs ((int) INTVAL (operands[2]) - 1);
2254
+ int elt = ffs ((int) INTVAL (operands[2])) - 1;
2255
if (BYTES_BIG_ENDIAN)
2256
elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
2257
operands[2] = GEN_INT (elt);
2258
Index: gcc/config/mips/mips.c
2259
===================================================================
2260
--- a/src/gcc/config/mips/mips.c (revision
2261
+++ b/src/gcc/config/mips/mips.c (revision
2262
@@ -1162,7 +1162,7 @@
2266
-static rtx mips_find_pic_call_symbol (rtx, rtx);
2267
+static rtx mips_find_pic_call_symbol (rtx, rtx, bool);
2269
/* This hash table keeps track of implicit "mips16" and "nomips16" attributes
2270
for -mflip_mips16. It maps decl names onto a boolean mode setting. */
2271
@@ -9007,6 +9007,11 @@
2273
mips_cfun_call_saved_reg_p (unsigned int regno)
2275
+ /* If the user makes an ordinarily-call-saved register global,
2276
+ that register is no longer call-saved. */
2277
+ if (global_regs[regno])
2280
/* Interrupt handlers need to save extra registers. */
2281
if (cfun->machine->interrupt_handler_p
2282
&& mips_interrupt_extra_call_saved_reg_p (regno))
2283
@@ -14040,12 +14045,16 @@
2286
/* REG is set in DEF. See if the definition is one of the ways we load a
2287
- register with a symbol address for a mips_use_pic_fn_addr_reg_p call. If
2288
- it is return the symbol reference of the function, otherwise return
2290
+ register with a symbol address for a mips_use_pic_fn_addr_reg_p call.
2291
+ If it is, return the symbol reference of the function, otherwise return
2294
+ If RECURSE_P is true, use mips_find_pic_call_symbol to interpret
2295
+ the values of source registers, otherwise treat such registers as
2296
+ having an unknown value. */
2299
-mips_pic_call_symbol_from_set (df_ref def, rtx reg)
2300
+mips_pic_call_symbol_from_set (df_ref def, rtx reg, bool recurse_p)
2304
@@ -14072,21 +14081,39 @@
2308
- /* Follow simple register copies. */
2310
- return mips_find_pic_call_symbol (def_insn, src);
2311
+ /* Follow at most one simple register copy. Such copies are
2312
+ interesting in cases like:
2316
+ locally_binding_fn (...);
2321
+ locally_binding_fn (...);
2323
+ locally_binding_fn (...);
2325
+ where the load of locally_binding_fn can legitimately be
2326
+ hoisted or shared. However, we do not expect to see complex
2327
+ chains of copies, so a full worklist solution to the problem
2328
+ would probably be overkill. */
2329
+ if (recurse_p && REG_P (src))
2330
+ return mips_find_pic_call_symbol (def_insn, src, false);
2336
-/* Find the definition of the use of REG in INSN. See if the definition is
2337
- one of the ways we load a register with a symbol address for a
2338
- mips_use_pic_fn_addr_reg_p call. If it is return the symbol reference of
2339
- the function, otherwise return NULL_RTX. */
2340
+/* Find the definition of the use of REG in INSN. See if the definition
2341
+ is one of the ways we load a register with a symbol address for a
2342
+ mips_use_pic_fn_addr_reg_p call. If it is return the symbol reference
2343
+ of the function, otherwise return NULL_RTX. RECURSE_P is as for
2344
+ mips_pic_call_symbol_from_set. */
2347
-mips_find_pic_call_symbol (rtx insn, rtx reg)
2348
+mips_find_pic_call_symbol (rtx insn, rtx reg, bool recurse_p)
2351
struct df_link *defs;
2352
@@ -14098,7 +14125,7 @@
2353
defs = DF_REF_CHAIN (use);
2356
- symbol = mips_pic_call_symbol_from_set (defs->ref, reg);
2357
+ symbol = mips_pic_call_symbol_from_set (defs->ref, reg, recurse_p);
2361
@@ -14107,7 +14134,7 @@
2365
- other = mips_pic_call_symbol_from_set (defs->ref, reg);
2366
+ other = mips_pic_call_symbol_from_set (defs->ref, reg, recurse_p);
2367
if (!rtx_equal_p (symbol, other))
2370
@@ -14178,7 +14205,7 @@
2374
- symbol = mips_find_pic_call_symbol (insn, reg);
2375
+ symbol = mips_find_pic_call_symbol (insn, reg, true);
2378
mips_annotate_pic_call_expr (call, symbol);