2 ===================================================================
3 --- gcc/targhooks.c (.../tags/gcc_4_6_3_release) (wersja 185440)
4 +++ gcc/targhooks.c (.../branches/gcc-4_6-branch) (wersja 185440)
7 case cond_branch_not_taken:
9 + case vec_promote_demote:
14 ===================================================================
15 --- gcc/DATESTAMP (.../tags/gcc_4_6_3_release) (wersja 185440)
16 +++ gcc/DATESTAMP (.../branches/gcc-4_6-branch) (wersja 185440)
21 ===================================================================
22 --- gcc/target.h (.../tags/gcc_4_6_3_release) (wersja 185440)
23 +++ gcc/target.h (.../branches/gcc-4_6-branch) (wersja 185440)
26 cond_branch_not_taken,
33 /* Sets of optimization levels at which an option may be enabled by
35 ===================================================================
36 --- gcc/DEV-PHASE (.../tags/gcc_4_6_3_release) (wersja 185440)
37 +++ gcc/DEV-PHASE (.../branches/gcc-4_6-branch) (wersja 185440)
41 ===================================================================
42 --- gcc/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440)
43 +++ gcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440)
45 +2012-03-15 Chung-Lin Tang <cltang@codesourcery.com>
47 + Backport from mainline
48 + 2012-03-10 Chung-Lin Tang <cltang@codesourcery.com>
50 + PR rtl-optimization/52528
51 + * combine.c (can_combine_p): Add setting of subst_low_luid
52 + before call to expand_field_assignment().
54 +2012-03-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
56 + Backport from mainline
57 + 2011-09-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
59 + PR Bug middle-end/50232
60 + * config/pa/pa.md (return): Define "return" insn pattern.
61 + (epilogue): Use it when no epilogue is needed.
62 + * config/pa/pa.c (pa_can_use_return_insn): New function.
63 + * config/pa/pa-protos.h (pa_can_use_return_insn): Declare.
65 + Backport for mainline
66 + 2012-01-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
69 + * config/pa/pa.c (pa_return_addr_rtx): Add support for PA2.0 export
72 +2012-03-06 Michael Meissner <meissner@linux.vnet.ibm.com>
74 + Backport from mainline
76 + * config/rs6000/vector.md (vector_uneq<mode>): Add support for
77 + UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons.
78 + (vector_ltgt<mode>): Likewise.
79 + (vector_ordered<mode>): Likewise.
80 + (vector_unordered<mode>): Likewise.
81 + * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner):
84 +2012-03-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
86 + Backport from mainline
87 + 2012-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
90 + * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to
91 + unsigned HOST_WIDE_INT.
92 + (zvdep_imm64): Likewise.
93 + (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT.
94 + (vdepi_and): Likewise.
95 + Likewise for unamed 64-bit patterns.
96 + * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment.
98 +2012-03-03 Eric Botcazou <ebotcazou@adacore.com>
101 + Backport from mainline
102 + 2011-05-22 Eric Botcazou <ebotcazou@adacore.com>
104 + * config/sparc/sparc.c (sparc_delegitimize_address): Handle
105 + UNSPEC_MOVE_PIC pattern.
107 +2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
109 + Backport from mainline
110 + 2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
112 + * config/rs6000/vsx.md (vsx_set_<mode>): Reorder operands.
114 +2012-03-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
115 + Ira Rosen <irar@il.ibm.com>
117 + PR tree-optimization/50031
118 + PR tree-optimization/50969
119 + * targhooks.c (default_builtin_vectorization_cost): Handle
120 + vec_promote_demote.
121 + * target.h (enum vect_cost_for_stmt): Add vec_promote_demote.
122 + * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Handle
123 + all types of reduction and pattern statements.
124 + (vect_estimate_min_profitable_iters): Likewise.
125 + * tree-vect-stmts.c (vect_model_promotion_demotion_cost): New function.
126 + (vect_model_store_cost): Use vec_perm rather than vector_stmt for
128 + (vect_model_load_cost): Likewise.
129 + (vect_get_load_cost): Likewise; add dump logic for explicit realigns.
130 + (vectorizable_type_demotion): Call vect_model_promotion_demotion_cost.
131 + (vectorizable_type_promotion): Likewise.
132 + * config/spu/spu.c (spu_builtin_vectorization_cost): Handle
133 + vec_promote_demote.
134 + * config/i386/i386.c (ix86_builtin_vectorization_cost): Likewise.
135 + * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Update
136 + vec_perm for VSX and handle vec_promote_demote.
138 +2012-03-01 Jakub Jelinek <jakub@redhat.com>
140 + * BASE-VER: Set to 4.6.4.
141 + * DEV-PHASE: Set to prerelease.
143 2012-03-01 Release Manager
145 * GCC 4.6.3 released.
146 Index: gcc/testsuite/gcc.target/powerpc/pr52457.c
147 ===================================================================
148 --- gcc/testsuite/gcc.target/powerpc/pr52457.c (.../tags/gcc_4_6_3_release) (wersja 0)
149 +++ gcc/testsuite/gcc.target/powerpc/pr52457.c (.../branches/gcc-4_6-branch) (wersja 185440)
151 +/* { dg-do run { target { powerpc*-*-linux* } } } */
152 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
153 +/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
154 +/* { dg-require-effective-target vsx_hw } */
155 +/* { dg-options "-O1 -mcpu=power7" } */
157 +extern void abort (void);
159 +typedef long long T;
160 +typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
178 + rval = buggy_func (2);
180 + if (pl[0] != 2 || pl[1] != 2)
185 Index: gcc/testsuite/gfortran.dg/intrinsic_8.f90
186 ===================================================================
187 --- gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../tags/gcc_4_6_3_release) (wersja 0)
188 +++ gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../branches/gcc-4_6-branch) (wersja 185440)
194 +! Contributed by Roger Ferrer Ibanez
199 + REAL(4) :: tarray(1:2)
202 + CALL etime(tarray, result)
203 +END PROGRAM test_etime
205 +subroutine test_etime2
208 + REAL(4) :: tarray(1:2)
211 + result = etime(tarray)
212 +END subroutine test_etime2
213 Index: gcc/testsuite/gfortran.dg/proc_ptr_34.f90
214 ===================================================================
215 --- gcc/testsuite/gfortran.dg/proc_ptr_34.f90 (.../tags/gcc_4_6_3_release) (wersja 0)
216 +++ gcc/testsuite/gfortran.dg/proc_ptr_34.f90 (.../branches/gcc-4_6-branch) (wersja 185440)
222 +! This was failing as the DECL of the proc pointer "func"
223 +! was used for the interface of the proc-pointer component "my_f_ptr"
224 +! rather than the decl of the proc-pointer target
226 +! Contributed by palott@gmail.com
232 + ! NOTE: "func" is a procedure pointer!
237 + real, intent (in) :: z
241 + type Contains_f_ptr
242 + procedure (func), pointer, nopass :: my_f_ptr
243 + end type Contains_f_ptr
248 + real, intent (in) :: x
257 + real, intent (in) :: x
264 +function fancy (func, x)
266 + real, intent (in) :: x
271 + real, intent (in) ::y
273 + end interface AFunc
275 + fancy = func (x) + 3.3 * x
278 +end module ExampleFuncs
281 +program test_proc_ptr
285 + type (Contains_f_ptr), dimension (2) :: NewType
287 + !NewType(1) % my_f_ptr => f1
288 + NewType(2) % my_f_ptr => f2
290 + !write (*, *) NewType(1) % my_f_ptr (3.0), NewType(2) % my_f_ptr (3.0)
291 + write (6, *) NewType(2) % my_f_ptr (3.0) ! < Shall print '27.0'
294 +end program test_proc_ptr
296 +! { dg-final { cleanup-modules "examplefuncs" } }
297 Index: gcc/testsuite/ChangeLog
298 ===================================================================
299 --- gcc/testsuite/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440)
300 +++ gcc/testsuite/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440)
302 +2012-03-10 Tobias Burnus <burnus@net-b.de>
305 + * gfortran.dg/proc_ptr_34.f90: New.
307 +2012-03-06 Tobias Burnus <burnus@net-b.de>
309 + Backport from mainline
310 + 2012-03-02 Tobias Burnus <burnus@net-b.de>
313 + * gfortran.dg/intrinsic_8.f90: New.
315 +2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
317 + Backport from mainline
318 + 2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
320 + * gcc.target/powerpc/pr52457.c: New test.
322 2012-03-01 Release Manager
324 * GCC 4.6.3 released.
325 Index: gcc/fortran/ChangeLog
326 ===================================================================
327 --- gcc/fortran/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440)
328 +++ gcc/fortran/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440)
330 +2012-03-10 Tobias Burnus <burnus@net-b.de>
333 + * trans-types.c (gfc_get_function_type): Handle backend_decl
334 + of a procedure pointer.
336 +2012-03-06 Tobias Burnus <burnus@net-b.de>
338 + Backport from mainline
339 + 2012-03-02 Tobias Burnus <burnus@net-b.de>
342 + * resolve.c (resolve_intrinsic): Don't search for a
343 + function if we know that it is a subroutine.
345 2012-03-01 Release Manager
347 * GCC 4.6.3 released.
348 Index: gcc/fortran/trans-types.c
349 ===================================================================
350 --- gcc/fortran/trans-types.c (.../tags/gcc_4_6_3_release) (wersja 185440)
351 +++ gcc/fortran/trans-types.c (.../branches/gcc-4_6-branch) (wersja 185440)
352 @@ -2519,7 +2519,11 @@
353 || sym->attr.flavor == FL_PROGRAM);
355 if (sym->backend_decl)
356 - return TREE_TYPE (sym->backend_decl);
358 + if (sym->attr.proc_pointer)
359 + return TREE_TYPE (TREE_TYPE (sym->backend_decl));
360 + return TREE_TYPE (sym->backend_decl);
363 alternate_return = 0;
364 typelist = NULL_TREE;
365 Index: gcc/fortran/resolve.c
366 ===================================================================
367 --- gcc/fortran/resolve.c (.../tags/gcc_4_6_3_release) (wersja 185440)
368 +++ gcc/fortran/resolve.c (.../branches/gcc-4_6-branch) (wersja 185440)
369 @@ -1452,7 +1452,7 @@
371 if (sym->intmod_sym_id)
372 isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id);
374 + else if (!sym->attr.subroutine)
375 isym = gfc_find_function (sym->name);
379 ===================================================================
380 --- gcc/BASE-VER (.../tags/gcc_4_6_3_release) (wersja 185440)
381 +++ gcc/BASE-VER (.../branches/gcc-4_6-branch) (wersja 185440)
385 Index: gcc/tree-vect-loop.c
386 ===================================================================
387 --- gcc/tree-vect-loop.c (.../tags/gcc_4_6_3_release) (wersja 185440)
388 +++ gcc/tree-vect-loop.c (.../branches/gcc-4_6-branch) (wersja 185440)
389 @@ -2104,7 +2104,8 @@
391 && !STMT_VINFO_RELEVANT_P (stmt_info)
392 && (!STMT_VINFO_LIVE_P (stmt_info)
393 - || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
394 + || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
395 + && !STMT_VINFO_IN_PATTERN_P (stmt_info))
398 if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt)))
399 @@ -2251,11 +2252,19 @@
401 gimple stmt = gsi_stmt (si);
402 stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
404 + if (STMT_VINFO_IN_PATTERN_P (stmt_info))
406 + stmt = STMT_VINFO_RELATED_STMT (stmt_info);
407 + stmt_info = vinfo_for_stmt (stmt);
410 /* Skip stmts that are not vectorized inside the loop. */
411 if (!STMT_VINFO_RELEVANT_P (stmt_info)
412 && (!STMT_VINFO_LIVE_P (stmt_info)
413 - || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
414 + || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))))
417 vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor;
418 /* FIXME: for stmts in the inner-loop in outer-loop vectorization,
419 some of the "outside" costs are generated inside the outer-loop. */
420 Index: gcc/tree-vect-stmts.c
421 ===================================================================
422 --- gcc/tree-vect-stmts.c (.../tags/gcc_4_6_3_release) (wersja 185440)
423 +++ gcc/tree-vect-stmts.c (.../branches/gcc-4_6-branch) (wersja 185440)
428 +/* Model cost for type demotion and promotion operations. PWR is normally
429 + zero for single-step promotions and demotions. It will be one if
430 + two-step promotion/demotion is required, and so on. Each additional
431 + step doubles the number of instructions required. */
434 +vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
435 + enum vect_def_type *dt, int pwr)
438 + int inside_cost = 0, outside_cost = 0, single_stmt_cost;
440 + /* The SLP costs were already calculated during SLP tree build. */
441 + if (PURE_SLP_STMT (stmt_info))
444 + single_stmt_cost = vect_get_stmt_cost (vec_promote_demote);
445 + for (i = 0; i < pwr + 1; i++)
447 + tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ?
449 + inside_cost += vect_pow2 (tmp) * single_stmt_cost;
452 + /* FORNOW: Assuming maximum 2 args per stmts. */
453 + for (i = 0; i < 2; i++)
455 + if (dt[i] == vect_constant_def || dt[i] == vect_external_def)
456 + outside_cost += vect_get_stmt_cost (vector_stmt);
459 + if (vect_print_dump_info (REPORT_COST))
460 + fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, "
461 + "outside_cost = %d .", inside_cost, outside_cost);
463 + /* Set the costs in STMT_INFO. */
464 + stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost);
465 + stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost);
468 /* Function vect_cost_strided_group_size
470 For strided load or store, return the group_size only if it is the first
473 /* Uses a high and low interleave operation for each needed permute. */
474 inside_cost = ncopies * exact_log2(group_size) * group_size
475 - * vect_get_stmt_cost (vector_stmt);
476 + * vect_get_stmt_cost (vec_perm);
478 if (vect_print_dump_info (REPORT_COST))
479 fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
482 /* Uses an even and odd extract operations for each needed permute. */
483 inside_cost = ncopies * exact_log2(group_size) * group_size
484 - * vect_get_stmt_cost (vector_stmt);
485 + * vect_get_stmt_cost (vec_perm);
487 if (vect_print_dump_info (REPORT_COST))
488 fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
490 case dr_explicit_realign:
492 *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load)
493 - + vect_get_stmt_cost (vector_stmt));
494 + + vect_get_stmt_cost (vec_perm));
496 /* FIXME: If the misalignment remains fixed across the iterations of
497 the containing loop, the following cost should be added to the
499 if (targetm.vectorize.builtin_mask_for_load)
500 *inside_cost += vect_get_stmt_cost (vector_stmt);
502 + if (vect_print_dump_info (REPORT_COST))
503 + fprintf (vect_dump, "vect_model_load_cost: explicit realign");
507 case dr_explicit_realign_optimized:
511 *inside_cost += ncopies * (vect_get_stmt_cost (vector_load)
512 - + vect_get_stmt_cost (vector_stmt));
513 + + vect_get_stmt_cost (vec_perm));
515 + if (vect_print_dump_info (REPORT_COST))
516 + fprintf (vect_dump,
517 + "vect_model_load_cost: explicit realign optimized");
522 @@ -2919,7 +2967,7 @@
523 STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
524 if (vect_print_dump_info (REPORT_DETAILS))
525 fprintf (vect_dump, "=== vectorizable_demotion ===");
526 - vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
527 + vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
531 @@ -3217,7 +3265,7 @@
532 STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
533 if (vect_print_dump_info (REPORT_DETAILS))
534 fprintf (vect_dump, "=== vectorizable_promotion ===");
535 - vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL);
536 + vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
541 ===================================================================
542 --- gcc/combine.c (.../tags/gcc_4_6_3_release) (wersja 185440)
543 +++ gcc/combine.c (.../branches/gcc-4_6-branch) (wersja 185440)
544 @@ -1788,6 +1788,10 @@
548 + /* The simplification in expand_field_assignment may call back to
549 + get_last_value, so set safe guard here. */
550 + subst_low_luid = DF_INSN_LUID (insn);
552 set = expand_field_assignment (set);
553 src = SET_SRC (set), dest = SET_DEST (set);
555 Index: gcc/config/spu/spu.c
556 ===================================================================
557 --- gcc/config/spu/spu.c (.../tags/gcc_4_6_3_release) (wersja 185440)
558 +++ gcc/config/spu/spu.c (.../branches/gcc-4_6-branch) (wersja 185440)
559 @@ -6794,6 +6794,7 @@
561 case cond_branch_not_taken:
563 + case vec_promote_demote:
567 Index: gcc/config/sparc/sparc.c
568 ===================================================================
569 --- gcc/config/sparc/sparc.c (.../tags/gcc_4_6_3_release) (wersja 185440)
570 +++ gcc/config/sparc/sparc.c (.../branches/gcc-4_6-branch) (wersja 185440)
571 @@ -3658,13 +3658,17 @@
573 x = delegitimize_mem_from_attrs (x);
575 - if (GET_CODE (x) == LO_SUM
576 - && GET_CODE (XEXP (x, 1)) == UNSPEC
577 - && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE)
579 - x = XVECEXP (XEXP (x, 1), 0, 0);
580 - gcc_assert (GET_CODE (x) == SYMBOL_REF);
582 + if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC)
583 + switch (XINT (XEXP (x, 1), 1))
585 + case UNSPEC_MOVE_PIC:
587 + x = XVECEXP (XEXP (x, 1), 0, 0);
588 + gcc_assert (GET_CODE (x) == SYMBOL_REF);
596 Index: gcc/config/i386/i386.c
597 ===================================================================
598 --- gcc/config/i386/i386.c (.../tags/gcc_4_6_3_release) (wersja 185440)
599 +++ gcc/config/i386/i386.c (.../branches/gcc-4_6-branch) (wersja 185440)
600 @@ -32823,7 +32823,8 @@
601 return ix86_cost->cond_not_taken_branch_cost;
605 + case vec_promote_demote:
606 + return ix86_cost->vec_stmt_cost;
610 Index: gcc/config/rs6000/vector.md
611 ===================================================================
612 --- gcc/config/rs6000/vector.md (.../tags/gcc_4_6_3_release) (wersja 185440)
613 +++ gcc/config/rs6000/vector.md (.../branches/gcc-4_6-branch) (wersja 185440)
615 "VECTOR_UNIT_ALTIVEC_P (<MODE>mode)"
618 +(define_insn_and_split "*vector_uneq<mode>"
619 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
620 + (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
621 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
622 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
625 + [(set (match_dup 3)
626 + (gt:VEC_F (match_dup 1)
629 + (gt:VEC_F (match_dup 2)
632 + (not:VEC_F (ior:VEC_F (match_dup 3)
636 + operands[3] = gen_reg_rtx (<MODE>mode);
637 + operands[4] = gen_reg_rtx (<MODE>mode);
640 +(define_insn_and_split "*vector_ltgt<mode>"
641 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
642 + (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
643 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
644 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
647 + [(set (match_dup 3)
648 + (gt:VEC_F (match_dup 1)
651 + (gt:VEC_F (match_dup 2)
654 + (ior:VEC_F (match_dup 3)
658 + operands[3] = gen_reg_rtx (<MODE>mode);
659 + operands[4] = gen_reg_rtx (<MODE>mode);
662 +(define_insn_and_split "*vector_ordered<mode>"
663 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
664 + (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
665 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
666 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
669 + [(set (match_dup 3)
670 + (ge:VEC_F (match_dup 1)
673 + (ge:VEC_F (match_dup 2)
676 + (ior:VEC_F (match_dup 3)
680 + operands[3] = gen_reg_rtx (<MODE>mode);
681 + operands[4] = gen_reg_rtx (<MODE>mode);
684 +(define_insn_and_split "*vector_unordered<mode>"
685 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
686 + (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
687 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
688 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
691 + [(set (match_dup 3)
692 + (ge:VEC_F (match_dup 1)
695 + (ge:VEC_F (match_dup 2)
698 + (not:VEC_F (ior:VEC_F (match_dup 3)
702 + operands[3] = gen_reg_rtx (<MODE>mode);
703 + operands[4] = gen_reg_rtx (<MODE>mode);
706 ;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask
707 ;; which is in the reverse order that we want
708 (define_expand "vector_select_<mode>"
709 Index: gcc/config/rs6000/rs6000.c
710 ===================================================================
711 --- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_6_3_release) (wersja 185440)
712 +++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_6-branch) (wersja 185440)
713 @@ -3695,12 +3695,23 @@
716 case cond_branch_not_taken:
720 case cond_branch_taken:
729 + case vec_promote_demote:
736 if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
738 @@ -17229,6 +17240,10 @@
746 mask = gen_reg_rtx (mode);
747 emit_insn (gen_rtx_SET (VOIDmode,
749 Index: gcc/config/rs6000/vsx.md
750 ===================================================================
751 --- gcc/config/rs6000/vsx.md (.../tags/gcc_4_6_3_release) (wersja 185440)
752 +++ gcc/config/rs6000/vsx.md (.../branches/gcc-4_6-branch) (wersja 185440)
753 @@ -1006,9 +1006,9 @@
754 "VECTOR_MEM_VSX_P (<MODE>mode)"
756 if (INTVAL (operands[3]) == 0)
757 - return \"xxpermdi %x0,%x1,%x2,1\";
758 + return \"xxpermdi %x0,%x2,%x1,1\";
759 else if (INTVAL (operands[3]) == 1)
760 - return \"xxpermdi %x0,%x2,%x1,0\";
761 + return \"xxpermdi %x0,%x1,%x2,0\";
765 Index: gcc/config/pa/predicates.md
766 ===================================================================
767 --- gcc/config/pa/predicates.md (.../tags/gcc_4_6_3_release) (wersja 185440)
768 +++ gcc/config/pa/predicates.md (.../branches/gcc-4_6-branch) (wersja 185440)
770 (ior (match_operand 0 "register_operand")
771 (match_operand 0 "cint_ior_operand")))
773 -;; True iff OP is a CONST_INT of the forms 0...0xxxx or
774 -;; 0...01...1xxxx. Such values can be the left hand side x in (x <<
775 -;; r), using the zvdepi instruction.
776 +;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx,
777 +;; or 1...1xxxx. Such values can be the left hand side x in (x << r),
778 +;; using the zvdepi instruction.
780 (define_predicate "lhs_lshift_cint_operand"
781 (match_code "const_int")
782 Index: gcc/config/pa/pa.md
783 ===================================================================
784 --- gcc/config/pa/pa.md (.../tags/gcc_4_6_3_release) (wersja 185440)
785 +++ gcc/config/pa/pa.md (.../branches/gcc-4_6-branch) (wersja 185440)
786 @@ -6348,7 +6348,7 @@
790 - int x = INTVAL (operands[1]);
791 + unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
792 operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
793 operands[1] = GEN_INT ((x & 0xf) - 0x10);
794 return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\";
795 @@ -6366,7 +6366,7 @@
796 "exact_log2 (INTVAL (operands[1]) + 1) > 0"
799 - int x = INTVAL (operands[1]);
800 + HOST_WIDE_INT x = INTVAL (operands[1]);
801 operands[2] = GEN_INT (exact_log2 (x + 1));
802 return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\";
804 @@ -6383,7 +6383,7 @@
805 "INTVAL (operands[1]) == -2"
808 - int x = INTVAL (operands[1]);
809 + HOST_WIDE_INT x = INTVAL (operands[1]);
810 operands[2] = GEN_INT (exact_log2 ((~x) + 1));
811 return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\";
813 @@ -6447,7 +6447,7 @@
817 - int x = INTVAL (operands[1]);
818 + unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
819 operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
820 operands[1] = GEN_INT ((x & 0x1f) - 0x20);
821 return \"depdi,z %1,%%sar,%2,%0\";
822 @@ -6465,7 +6465,7 @@
823 "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0"
826 - int x = INTVAL (operands[1]);
827 + HOST_WIDE_INT x = INTVAL (operands[1]);
828 operands[2] = GEN_INT (exact_log2 (x + 1));
829 return \"depdi -1,%%sar,%2,%0\";
831 @@ -6482,7 +6482,7 @@
832 "TARGET_64BIT && INTVAL (operands[1]) == -2"
835 - int x = INTVAL (operands[1]);
836 + HOST_WIDE_INT x = INTVAL (operands[1]);
837 operands[2] = GEN_INT (exact_log2 ((~x) + 1));
838 return \"depdi 0,%%sar,%2,%0\";
840 @@ -6671,6 +6671,20 @@
842 ;; Unconditional and other jump instructions.
844 +;; Trivial return used when no epilogue is needed.
845 +(define_insn "return"
848 + "pa_can_use_return_insn ()"
852 + return \"bve%* (%%r2)\";
853 + return \"bv%* %%r0(%%r2)\";
855 + [(set_attr "type" "branch")
856 + (set_attr "length" "4")])
858 ;; This is used for most returns.
859 (define_insn "return_internal"
861 @@ -6719,11 +6733,8 @@
864 /* Try to use the trivial return first. Else use the full epilogue. */
865 - if (reload_completed
866 - && !frame_pointer_needed
867 - && !df_regs_ever_live_p (2)
868 - && (compute_frame_size (get_frame_size (), 0) ? 0 : 1))
869 - x = gen_return_internal ();
870 + if (pa_can_use_return_insn ())
874 hppa_expand_epilogue ();
875 Index: gcc/config/pa/pa-protos.h
876 ===================================================================
877 --- gcc/config/pa/pa-protos.h (.../tags/gcc_4_6_3_release) (wersja 185440)
878 +++ gcc/config/pa/pa-protos.h (.../branches/gcc-4_6-branch) (wersja 185440)
880 extern int cint_ok_for_move (HOST_WIDE_INT);
881 extern void hppa_expand_prologue (void);
882 extern void hppa_expand_epilogue (void);
883 +extern bool pa_can_use_return_insn (void);
884 extern int ior_mask_p (unsigned HOST_WIDE_INT);
885 extern void compute_zdepdi_operands (unsigned HOST_WIDE_INT,
887 Index: gcc/config/pa/pa.c
888 ===================================================================
889 --- gcc/config/pa/pa.c (.../tags/gcc_4_6_3_release) (wersja 185440)
890 +++ gcc/config/pa/pa.c (.../branches/gcc-4_6-branch) (wersja 185440)
891 @@ -4442,6 +4442,24 @@
896 +pa_can_use_return_insn (void)
898 + if (!reload_completed)
901 + if (frame_pointer_needed)
904 + if (df_regs_ever_live_p (2))
910 + return compute_frame_size (get_frame_size (), 0) == 0;
914 hppa_pic_save_rtx (void)
916 @@ -4586,7 +4604,7 @@
920 - /* Instruction stream at the normal return address for the export stub:
921 + /* The instruction stream at the return address of a PA1.X export stub is:
923 0x4bc23fd1 | stub+8: ldw -18(sr0,sp),rp
924 0x004010a1 | stub+12: ldsid (sr0,rp),r1
925 @@ -4594,11 +4612,17 @@
926 0xe0400002 | stub+20: be,n 0(sr0,rp)
928 0xe0400002 must be specified as -532676606 so that it won't be
929 - rejected as an invalid immediate operand on 64-bit hosts. */
930 + rejected as an invalid immediate operand on 64-bit hosts.
932 - HOST_WIDE_INT insns[4] = {0x4bc23fd1, 0x004010a1, 0x00011820, -532676606};
934 + The instruction stream at the return address of a PA2.0 export stub is:
936 + 0x4bc23fd1 | stub+8: ldw -18(sr0,sp),rp
937 + 0xe840d002 | stub+12: bve,n (rp)
940 + HOST_WIDE_INT insns[4];
946 @@ -4620,11 +4644,26 @@
947 ins = copy_to_reg (gen_rtx_AND (Pmode, rp, MASK_RETURN_ADDR));
948 label = gen_label_rtx ();
952 + insns[0] = 0x4bc23fd1;
953 + insns[1] = -398405630;
958 + insns[0] = 0x4bc23fd1;
959 + insns[1] = 0x004010a1;
960 + insns[2] = 0x00011820;
961 + insns[3] = -532676606;
965 /* Check the instruction stream at the normal return address for the
966 export stub. If it is an export stub, than our return address is
967 really in -24[frameaddr]. */
969 - for (i = 0; i < 3; i++)
970 + for (i = 0; i < len; i++)
972 rtx op0 = gen_rtx_MEM (SImode, plus_constant (ins, i * 4));
973 rtx op1 = GEN_INT (insns[i]);
974 Index: libstdc++-v3/include/debug/safe_iterator.h
975 ===================================================================
976 --- libstdc++-v3/include/debug/safe_iterator.h (.../tags/gcc_4_6_3_release) (wersja 185440)
977 +++ libstdc++-v3/include/debug/safe_iterator.h (.../branches/gcc-4_6-branch) (wersja 185440)
979 // Safe iterator implementation -*- C++ -*-
981 -// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011
982 +// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012
983 // Free Software Foundation, Inc.
985 // This file is part of the GNU ISO C++ Library. This library is free
987 ._M_iterator(__x, "other"));
990 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
992 + * @brief Move construction.
993 + * @post __x is singular and unattached
995 + _Safe_iterator(_Safe_iterator&& __x) : _M_current()
997 + _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
998 + || __x._M_current == _Iterator(),
999 + _M_message(__msg_init_copy_singular)
1000 + ._M_iterator(*this, "this")
1001 + ._M_iterator(__x, "other"));
1002 + std::swap(_M_current, __x._M_current);
1003 + this->_M_attach(__x._M_sequence);
1009 * @brief Converting constructor from a mutable iterator to a
1010 * constant iterator.
1012 @@ -181,7 +199,28 @@
1016 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
1018 + * @brief Move assignment.
1019 + * @post __x is singular and unattached
1022 + operator=(_Safe_iterator&& __x)
1024 + _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
1025 + || __x._M_current == _Iterator(),
1026 + _M_message(__msg_copy_singular)
1027 + ._M_iterator(*this, "this")
1028 + ._M_iterator(__x, "other"));
1029 + _M_current = __x._M_current;
1030 + _M_attach(__x._M_sequence);
1032 + __x._M_current = _Iterator();
1038 * @brief Iterator dereference.
1039 * @pre iterator is dereferenceable
1042 /// Is this iterator equal to the sequence's before_begin() iterator if
1044 bool _M_is_before_begin() const
1045 - { return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence()); }
1047 + return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence());
1051 template<typename _IteratorL, typename _IteratorR, typename _Sequence>
1052 Index: libstdc++-v3/ChangeLog
1053 ===================================================================
1054 --- libstdc++-v3/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440)
1055 +++ libstdc++-v3/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440)
1057 +2012-03-08 Jonathan Wakely <jwakely.gcc@gmail.com>
1059 + PR libstdc++/52433
1060 + * include/debug/safe_iterator.h (_Safe_iterator): Add move
1061 + constructor and move assignment operator.
1062 + * testsuite/23_containers/vector/debug/52433.cc: New.
1064 2012-03-01 Release Manager
1066 * GCC 4.6.3 released.
1067 Index: libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc
1068 ===================================================================
1069 --- libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc (.../tags/gcc_4_6_3_release) (wersja 0)
1070 +++ libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc (.../branches/gcc-4_6-branch) (wersja 185440)
1072 +// Copyright (C) 2012 Free Software Foundation, Inc.
1074 +// This file is part of the GNU ISO C++ Library. This library is free
1075 +// software; you can redistribute it and/or modify it under the
1076 +// terms of the GNU General Public License as published by the
1077 +// Free Software Foundation; either version 3, or (at your option)
1078 +// any later version.
1080 +// This library is distributed in the hope that it will be useful,
1081 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1082 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1083 +// GNU General Public License for more details.
1085 +// You should have received a copy of the GNU General Public License along
1086 +// with this library; see the file COPYING3. If not see
1087 +// <http://www.gnu.org/licenses/>.
1089 +// { dg-require-debug-mode "" }
1090 +// { dg-options "-std=gnu++0x" }
1091 +// { dg-do compile }
1093 +// PR libstdc++/52433
1099 + std::vector<int>::iterator i;
1102 + X(const X&) = default;
1104 + X& operator=(const X&) = default;
1105 + X& operator=(X&&) = default;
1115 Index: boehm-gc/configure.ac
1116 ===================================================================
1117 --- boehm-gc/configure.ac (.../tags/gcc_4_6_3_release) (wersja 185440)
1118 +++ boehm-gc/configure.ac (.../branches/gcc-4_6-branch) (wersja 185440)
1121 LIBS="$LIBS $THREADLIBS"
1122 AC_CHECK_FUNCS([pthread_getattr_np])
1123 +AC_CHECK_FUNCS([pthread_get_stackaddr_np])
1126 # Configuration of machine-dependent code
1127 Index: boehm-gc/include/gc_config.h.in
1128 ===================================================================
1129 --- boehm-gc/include/gc_config.h.in (.../tags/gcc_4_6_3_release) (wersja 185440)
1130 +++ boehm-gc/include/gc_config.h.in (.../branches/gcc-4_6-branch) (wersja 185440)
1132 /* Define to 1 if you have the `pthread_getattr_np' function. */
1133 #undef HAVE_PTHREAD_GETATTR_NP
1135 +/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */
1136 +#undef HAVE_PTHREAD_GET_STACKADDR_NP
1138 /* Define to 1 if you have the <stdint.h> header file. */
1139 #undef HAVE_STDINT_H
1141 Index: boehm-gc/include/private/gcconfig.h
1142 ===================================================================
1143 --- boehm-gc/include/private/gcconfig.h (.../tags/gcc_4_6_3_release) (wersja 185440)
1144 +++ boehm-gc/include/private/gcconfig.h (.../branches/gcc-4_6-branch) (wersja 185440)
1145 @@ -1331,7 +1331,11 @@
1146 These aren't used when dyld support is enabled (it is by default) */
1147 # define DATASTART ((ptr_t) get_etext())
1148 # define DATAEND ((ptr_t) get_end())
1149 -# define STACKBOTTOM ((ptr_t) 0xc0000000)
1150 +# ifdef HAVE_PTHREAD_GET_STACKADDR_NP
1151 +# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
1153 +# define STACKBOTTOM ((ptr_t) 0xc0000000)
1156 # define USE_MMAP_ANON
1157 # define USE_ASM_PUSH_REGS
1158 @@ -2011,7 +2015,11 @@
1159 These aren't used when dyld support is enabled (it is by default) */
1160 # define DATASTART ((ptr_t) get_etext())
1161 # define DATAEND ((ptr_t) get_end())
1162 -# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
1163 +# ifdef HAVE_PTHREAD_GET_STACKADDR_NP
1164 +# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
1166 +# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
1169 # define USE_MMAP_ANON
1170 # ifdef GC_DARWIN_THREADS
1171 Index: boehm-gc/ChangeLog
1172 ===================================================================
1173 --- boehm-gc/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440)
1174 +++ boehm-gc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440)
1176 +2012-03-02 Jack Howarth <howarth@bromo.med.uc.edu>
1178 + Backport from mainline
1179 + 2012-02-23 Patrick Marlier <patrick.marlier@gmail.com>
1180 + Jack Howarth <howarth@bromo.med.uc.edu>
1183 + * include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP.
1184 + * include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with
1185 + pthread_get_stackaddr_np when available.
1186 + * configure.ac (THREADS): Check availability of
1187 + pthread_get_stackaddr_np.
1188 + * configure: Regenerate.
1190 2012-03-01 Release Manager
1192 * GCC 4.6.3 released.
1193 Index: boehm-gc/configure
1194 ===================================================================
1195 --- boehm-gc/configure (.../tags/gcc_4_6_3_release) (wersja 185440)
1196 +++ boehm-gc/configure (.../branches/gcc-4_6-branch) (wersja 185440)
1197 @@ -15246,6 +15246,17 @@
1201 +for ac_func in pthread_get_stackaddr_np
1203 + ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np"
1204 +if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then :
1205 + cat >>confdefs.h <<_ACEOF
1206 +#define HAVE_PTHREAD_GET_STACKADDR_NP 1
1214 # Configuration of machine-dependent code
1215 Index: libjava/configure.ac
1216 ===================================================================
1217 --- libjava/configure.ac (.../tags/gcc_4_6_3_release) (wersja 185440)
1218 +++ libjava/configure.ac (.../branches/gcc-4_6-branch) (wersja 185440)
1219 @@ -886,14 +886,9 @@
1220 SYSTEMSPEC="-lunicows $SYSTEMSPEC"
1224 + *-*-darwin[[912]]*)
1225 SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
1227 - *-*-darwin[[12]]*)
1228 - # Something is incompatible with pie, would be nice to fix it and
1229 - # remove -no_pie. PR49461
1230 - SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
1235 Index: libjava/ChangeLog
1236 ===================================================================
1237 --- libjava/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440)
1238 +++ libjava/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440)
1240 +2012-03-02 Jack Howarth <howarth@bromo.med.uc.edu>
1242 + Backport from mainline
1243 + 2012-02-23 Patrick Marlier <patrick.marlier@gmail.com>
1244 + Jack Howarth <howarth@bromo.med.uc.edu>
1247 + * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11.
1248 + * configure: Regenerate.
1250 2012-03-01 Release Manager
1252 * GCC 4.6.3 released.
1253 Index: libjava/configure
1254 ===================================================================
1255 --- libjava/configure (.../tags/gcc_4_6_3_release) (wersja 185440)
1256 +++ libjava/configure (.../branches/gcc-4_6-branch) (wersja 185440)
1257 @@ -19775,14 +19775,9 @@
1258 SYSTEMSPEC="-lunicows $SYSTEMSPEC"
1263 SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
1266 - # Something is incompatible with pie, would be nice to fix it and
1267 - # remove -no_pie. PR49461
1268 - SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"