packages: gcc/gcc-branch.diff, gcc/gcc.spec - rel 3; branch diff updated

arekm arekm at pld-linux.org
Mon Jan 24 20:05:06 CET 2011


Author: arekm                        Date: Mon Jan 24 19:05:05 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 3; branch diff updated

---- Files affected:
packages/gcc:
   gcc-branch.diff (1.41 -> 1.42) , gcc.spec (1.645 -> 1.646) 

---- Diffs:

================================================================
Index: packages/gcc/gcc-branch.diff
diff -u packages/gcc/gcc-branch.diff:1.41 packages/gcc/gcc-branch.diff:1.42
--- packages/gcc/gcc-branch.diff:1.41	Sat Jan  8 18:34:36 2011
+++ packages/gcc/gcc-branch.diff	Mon Jan 24 20:04:59 2011
@@ -1,7 +1,7 @@
 Index: libgomp/configure.tgt
 ===================================================================
---- libgomp/configure.tgt	(.../tags/gcc_4_5_2_release)	(wersja 168599)
-+++ libgomp/configure.tgt	(.../branches/gcc-4_5-branch)	(wersja 168599)
+--- libgomp/configure.tgt	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ libgomp/configure.tgt	(.../branches/gcc-4_5-branch)	(wersja 169176)
 @@ -125,6 +125,10 @@
  	config_path="bsd posix"
  	;;
@@ -15,9 +15,17 @@
  
 Index: libgomp/ChangeLog
 ===================================================================
---- libgomp/ChangeLog	(.../tags/gcc_4_5_2_release)	(wersja 168599)
-+++ libgomp/ChangeLog	(.../branches/gcc-4_5-branch)	(wersja 168599)
-@@ -1,3 +1,10 @@
+--- libgomp/ChangeLog	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ libgomp/ChangeLog	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -1,3 +1,18 @@
++2011-01-16  Jakub Jelinek  <jakub at redhat.com>
++
++	Backport from mainline
++	2010-12-14  Jakub Jelinek  <jakub at redhat.com>
++
++	PR fortran/46874
++	* libgomp.fortran/allocatable6.f90: New test.
++
 +2010-12-17  Rainer Orth  <ro at CeBiTec.Uni-Bielefeld.DE>
 +
 +	Backport from mainline:
@@ -28,10 +36,73 @@
  2010-12-16  Release Manager
  
  	* GCC 4.5.2 released.
+Index: libgomp/testsuite/libgomp.fortran/allocatable6.f90
+===================================================================
+--- libgomp/testsuite/libgomp.fortran/allocatable6.f90	(.../tags/gcc_4_5_2_release)	(wersja 0)
++++ libgomp/testsuite/libgomp.fortran/allocatable6.f90	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -0,0 +1,45 @@
++! PR fortran/46874
++! { dg-do run }
++
++  interface
++    subroutine sub (a, b, c, d, n)
++      integer :: n
++      integer, allocatable :: a(:), b(:), c(:), d(:)
++    end subroutine
++  end interface
++
++  integer, allocatable :: a(:), b(:), c(:), d(:)
++  integer :: i, j
++  allocate (a(50), b(50), c(50), d(50))
++  do i = 1, 50
++    a(i) = 2 + modulo (i, 7)
++    b(i) = 179 - modulo (i, 11)
++  end do
++  c = 0
++  d = 2147483647
++  call sub (a, b, c, d, 50)
++  do i = 1, 50
++    j = 0
++    if (i .eq. 3) then
++      j = 8
++    else if (i .gt. 1 .and. i .lt. 9) then
++      j = 7
++    end if
++    if (c(i) .ne. j) call abort
++    j = 179 - modulo (i, 11)
++    if (i .gt. 1 .and. i .lt. 9) j = i
++    if (d(i) .ne. j) call abort
++  end do
++  deallocate (a, b, c, d)
++end
++
++subroutine sub (a, b, c, d, n)
++  integer :: n
++  integer, allocatable :: a(:), b(:), c(:), d(:)
++!$omp parallel do shared(a, b) reduction(+:c) reduction(min:d)
++  do i = 1, n
++    c(a(i)) = c(a(i)) + 1
++    d(i) = min(d(i), b(i))
++    d(a(i)) = min(d(a(i)), a(i))
++  end do
++end
+Index: gcc/tree-ssa-loop-im.c
+===================================================================
+--- gcc/tree-ssa-loop-im.c	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/tree-ssa-loop-im.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -2139,7 +2139,7 @@
+   edge ex;
+ 
+   for (i = 0; VEC_iterate (edge, exits, i, ex); i++)
+-    if (ex->flags & EDGE_ABNORMAL)
++    if (ex->flags & (EDGE_ABNORMAL | EDGE_EH))
+       return false;
+ 
+   return true;
 Index: gcc/tree-loop-distribution.c
 ===================================================================
---- gcc/tree-loop-distribution.c	(.../tags/gcc_4_5_2_release)	(wersja 168599)
-+++ gcc/tree-loop-distribution.c	(.../branches/gcc-4_5-branch)	(wersja 168599)
+--- gcc/tree-loop-distribution.c	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/tree-loop-distribution.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
 @@ -251,7 +251,7 @@
  
  /* Generate a call to memset.  Return true when the operation succeeded.  */
@@ -362,22 +433,30 @@
  /* Dump to FILE the PARTITIONS.  */
 Index: gcc/DATESTAMP
 ===================================================================
---- gcc/DATESTAMP	(.../tags/gcc_4_5_2_release)	(wersja 168599)
-+++ gcc/DATESTAMP	(.../branches/gcc-4_5-branch)	(wersja 168599)
+--- gcc/DATESTAMP	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/DATESTAMP	(.../branches/gcc-4_5-branch)	(wersja 169176)
 @@ -1 +1 @@
 -20101216
-+20110108
++20110124
 Index: gcc/DEV-PHASE
 ===================================================================
---- gcc/DEV-PHASE	(.../tags/gcc_4_5_2_release)	(wersja 168599)
-+++ gcc/DEV-PHASE	(.../branches/gcc-4_5-branch)	(wersja 168599)
+--- gcc/DEV-PHASE	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/DEV-PHASE	(.../branches/gcc-4_5-branch)	(wersja 169176)
 @@ -0,0 +1 @@
 +prerelease
 Index: gcc/tree-ssa-sccvn.c
 ===================================================================
---- gcc/tree-ssa-sccvn.c	(.../tags/gcc_4_5_2_release)	(wersja 168599)
-+++ gcc/tree-ssa-sccvn.c	(.../branches/gcc-4_5-branch)	(wersja 168599)
-@@ -1063,6 +1063,7 @@
+--- gcc/tree-ssa-sccvn.c	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/tree-ssa-sccvn.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -988,6 +988,7 @@
+ }
+ 
+ static tree *last_vuse_ptr;
++static vn_lookup_kind vn_walk_kind;
+ 
+ /* Callback for walk_non_aliased_vuses.  Adjusts the vn_reference_t VR_
+    with the current VUSE and performs the expression lookup.  */
+@@ -1063,6 +1064,7 @@
        size2 = TREE_INT_CST_LOW (gimple_call_arg (def_stmt, 2)) * 8;
        if ((unsigned HOST_WIDE_INT)size2 / 8
  	  == TREE_INT_CST_LOW (gimple_call_arg (def_stmt, 2))
@@ -385,7 +464,7 @@
  	  && operand_equal_p (base, base2, 0)
  	  && offset2 <= offset
  	  && offset2 + size2 >= offset + maxsize)
-@@ -1086,7 +1087,8 @@
+@@ -1086,7 +1088,8 @@
        HOST_WIDE_INT offset2, size2, maxsize2;
        base2 = get_ref_base_and_extent (gimple_assign_lhs (def_stmt),
  				       &offset2, &size2, &maxsize2);
@@ -395,7 +474,17 @@
  	  && offset2 <= offset
  	  && offset2 + size2 >= offset + maxsize)
  	{
-@@ -1116,7 +1118,8 @@
+@@ -1101,7 +1104,8 @@
+ 
+   /* For aggregate copies translate the reference through them if
+      the copy kills ref.  */
+-  else if (gimple_assign_single_p (def_stmt)
++  else if (vn_walk_kind == VN_WALKREWRITE
++	   && gimple_assign_single_p (def_stmt)
+ 	   && (DECL_P (gimple_assign_rhs1 (def_stmt))
+ 	       || INDIRECT_REF_P (gimple_assign_rhs1 (def_stmt))
+ 	       || handled_component_p (gimple_assign_rhs1 (def_stmt))))
+@@ -1116,7 +1120,8 @@
        /* See if the assignment kills REF.  */
        base2 = get_ref_base_and_extent (gimple_assign_lhs (def_stmt),
  				       &offset2, &size2, &maxsize2);
@@ -405,11 +494,250 @@
  	  || offset2 > offset
  	  || offset2 + size2 < offset + maxsize)
  	return (void *)-1;
+@@ -1190,7 +1195,7 @@
+ tree
+ vn_reference_lookup_pieces (tree vuse, alias_set_type set, tree type,
+ 			    VEC (vn_reference_op_s, heap) *operands,
+-			    vn_reference_t *vnresult, bool maywalk)
++			    vn_reference_t *vnresult, vn_lookup_kind kind)
+ {
+   struct vn_reference_s vr1;
+   vn_reference_t tmp;
+@@ -1215,10 +1220,11 @@
+   vn_reference_lookup_1 (&vr1, vnresult);
+ 
+   if (!*vnresult
+-      && maywalk
++      && kind != VN_NOWALK
+       && vr1.vuse)
+     {
+       ao_ref r;
++      vn_walk_kind = kind;
+       if (ao_ref_init_from_vn_reference (&r, set, type, vr1.operands))
+ 	*vnresult =
+ 	  (vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse,
+@@ -1241,7 +1247,7 @@
+    stored in the hashtable if one exists.  */
+ 
+ tree
+-vn_reference_lookup (tree op, tree vuse, bool maywalk,
++vn_reference_lookup (tree op, tree vuse, vn_lookup_kind kind,
+ 		     vn_reference_t *vnresult)
+ {
+   VEC (vn_reference_op_s, heap) *operands;
+@@ -1256,12 +1262,13 @@
+   vr1.set = get_alias_set (op);
+   vr1.hashcode = vn_reference_compute_hash (&vr1);
+ 
+-  if (maywalk
++  if (kind != VN_NOWALK
+       && vr1.vuse)
+     {
+       vn_reference_t wvnresult;
+       ao_ref r;
+       ao_ref_init (&r, op);
++      vn_walk_kind = kind;
+       wvnresult =
+ 	(vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse,
+ 						vn_reference_lookup_2,
+@@ -1980,14 +1987,14 @@
+ 
+   last_vuse = gimple_vuse (stmt);
+   last_vuse_ptr = &last_vuse;
+-  result = vn_reference_lookup (op, gimple_vuse (stmt), true, NULL);
++  result = vn_reference_lookup (op, gimple_vuse (stmt), VN_WALKREWRITE, NULL);
+   last_vuse_ptr = NULL;
+ 
+   /* If we have a VCE, try looking up its operand as it might be stored in
+      a different type.  */
+   if (!result && TREE_CODE (op) == VIEW_CONVERT_EXPR)
+     result = vn_reference_lookup (TREE_OPERAND (op, 0), gimple_vuse (stmt),
+-    				  true, NULL);
++    				  VN_WALKREWRITE, NULL);
+ 
+   /* We handle type-punning through unions by value-numbering based
+      on offset and size of the access.  Be prepared to handle a
+@@ -2098,7 +2105,7 @@
+      Otherwise, the vdefs for the store are used when inserting into
+      the table, since the store generates a new memory state.  */
+ 
+-  result = vn_reference_lookup (lhs, gimple_vuse (stmt), false, NULL);
++  result = vn_reference_lookup (lhs, gimple_vuse (stmt), VN_NOWALK, NULL);
+ 
+   if (result)
+     {
+Index: gcc/tree-ssa-sccvn.h
+===================================================================
+--- gcc/tree-ssa-sccvn.h	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/tree-ssa-sccvn.h	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -185,10 +185,11 @@
+ void copy_reference_ops_from_call (gimple, VEC(vn_reference_op_s, heap) **);
+ bool ao_ref_init_from_vn_reference (ao_ref *, alias_set_type, tree,
+ 				    VEC (vn_reference_op_s, heap) *);
++typedef enum { VN_NOWALK, VN_WALK, VN_WALKREWRITE } vn_lookup_kind;
+ tree vn_reference_lookup_pieces (tree, alias_set_type, tree,
+ 				 VEC (vn_reference_op_s, heap) *,
+-				 vn_reference_t *, bool);
+-tree vn_reference_lookup (tree, tree, bool, vn_reference_t *);
++				 vn_reference_t *, vn_lookup_kind);
++tree vn_reference_lookup (tree, tree, vn_lookup_kind, vn_reference_t *);
+ vn_reference_t vn_reference_insert (tree, tree, tree);
+ vn_reference_t vn_reference_insert_pieces (tree, alias_set_type, tree,
+ 					   VEC (vn_reference_op_s, heap) *,
 Index: gcc/ChangeLog
 ===================================================================
---- gcc/ChangeLog	(.../tags/gcc_4_5_2_release)	(wersja 168599)
-+++ gcc/ChangeLog	(.../branches/gcc-4_5-branch)	(wersja 168599)
-@@ -1,3 +1,157 @@
+--- gcc/ChangeLog	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/ChangeLog	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -1,3 +1,306 @@
++2011-01-21  Richard Guenther  <rguenther at suse.de>
++
++	PR tree-optimization/47365
++	* tree-ssa-sccvn.h (vn_lookup_kind): Declare.
++	(vn_reference_lookup_pieces): Adjust.
++	(vn_reference_lookup): Likewise.
++	* tree-ssa-sccvn.c (vn_walk_kind): New static global.
++	(vn_reference_lookup_3): Only look through kills if in
++	VN_WALKREWRITE mode.
++	(vn_reference_lookup_pieces): Adjust.
++	(vn_reference_lookup): Likewise.
++	(visit_reference_op_load): Likewise.
++	(visit_reference_op_store): Likewise.
++	* tree-ssa-pre.c (phi_translate_1): Use VN_WALK mode.
++	(compute_avail): Likewise.
++	(eliminate): Likewise.
++
++2011-01-20  Richard Guenther  <rguenther at suse.de>
++
++	PR tree-optimization/47167
++	* tree-ssa-copyrename.c (copy_rename_partition_coalesce):
++	Revert previous change, only avoid enumeral type changes.
++
++2011-01-17  H.J. Lu  <hongjiu.lu at intel.com>
++
++	Backport from mainline
++	2011-01-17  H.J. Lu  <hongjiu.lu at intel.com>
++
++	PR target/47318
++	* config/i386/avxintrin.h (_mm_maskload_pd): Change mask to
++	__m128i.
++	(_mm_maskstore_pd): Likewise.
++	(_mm_maskload_ps): Likewise.
++	(_mm_maskstore_ps): Likewise.
++	(_mm256_maskload_pd): Change mask to __m256i.
++	(_mm256_maskstore_pd): Likewise.
++	(_mm256_maskload_ps): Likewise.
++	(_mm256_maskstore_ps): Likewise.
++
++	* config/i386/i386-builtin-types.def: Updated.
++	(ix86_expand_special_args_builtin): Likewise.
++
++	* config/i386/i386.c (bdesc_special_args): Update
++	__builtin_ia32_maskloadpd, __builtin_ia32_maskloadps,
++	__builtin_ia32_maskloadpd256, __builtin_ia32_maskloadps256,
++	__builtin_ia32_maskstorepd, __builtin_ia32_maskstoreps,
++	__builtin_ia32_maskstorepd256 and __builtin_ia32_maskstoreps256.
++
++	* config/i386/sse.md (avx_maskload<ssemodesuffix><avxmodesuffix>):
++	Use <avxpermvecmode> on mask register.
++	(avx_maskstore<ssemodesuffix><avxmodesuffix>): Likewise.
++
++2011-01-17  Olivier Hainque  <hainque at adacore.com>
++            Michael Haubenwallner  <michael.haubenwallner at salomon.at>
++            Eric Botcazou  <ebotcazou at adacore.com>
++
++	PR target/46655
++	* xcoffout.c (ASM_OUTPUT_LINE): Output line only if positive, and only
++	if <= USHRT_MAX in 32-bit mode.
++
++2011-01-17  Richard Guenther  <rguenther at suse.de>
++
++	Backport from mainline
++	PR tree-optimization/47286
++	* tree-ssa-structalias.c (new_var_info): Register variables
++	are global.
++
++	PR tree-optimization/44592
++	* tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Copy
++	from trunk.
++
++2011-01-16  Jakub Jelinek  <jakub at redhat.com>
++
++	Backport from mainline
++	2011-01-07  Jakub Jelinek  <jakub at redhat.com>
++
++	PR target/47201
++	* config/i386/i386.c (ix86_delegitimize_address): If
++	simplify_gen_subreg fails, return orig_x.
++
++	2011-01-06  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c/47150
++	* c-convert.c (convert): When converting a complex expression
++	other than COMPLEX_EXPR to a different complex type, ensure
++	c_save_expr is called instead of save_expr, unless in_late_binary_op.
++	* c-typeck.c (convert_for_assignment): Set in_late_binary_op also
++	when converting COMPLEX_TYPE.
++
++	2010-12-21  Jakub Jelinek  <jakub at redhat.com>
++
++	PR target/46880
++	* config/i386/sse.md (sse2_loadlpd, sse2_movsd): Fix shufpd source
++	operand.
++
++	PR middle-end/45852
++	* expr.c (store_expr): Ignore alt_rtl if equal to target,
++	but has side-effects.
++
++	2010-12-16  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/43655
++	* tree-ssa-ter.c (is_replaceable_p): Don't use
++	gimple_references_memory_p for -O0, instead check for load
++	by looking at rhs.
++
++	PR debug/46893
++	* cfgexpand.c (expand_debug_expr): If GET_MODE (op0) is VOIDmode,
++	use TYPE_MODE (TREE_TYPE (tem)) instead of mode1.
++
++	2010-12-10  Jakub Jelinek  <jakub at redhat.com>
++
++	PR rtl-optimization/46804
++	* regmove.c (optimize_reg_copy_3): Look for REG_EQUAL note
++	on the setter of src_reg rather than on insn.  If it is
++	equal to the setter's original SET_SRC, replace it with its
++	zero or sign extension instead of dropping it.
++
++	PR rtl-optimization/46865
++	* rtl.c (rtx_equal_p_cb, rtx_equal_p): For last operand of
++	ASM_OPERANDS and ASM_INPUT if integers are different,
++	call locator_eq.
++	* jump.c (rtx_renumbered_equal_p): Likewise.
++
++	PR tree-optimization/46864
++	* tree-ssa-loop-im.c (loop_suitable_for_sm): Return false even
++	when there are EDGE_EH exit edges.
++
++	2010-12-09  Jakub Jelinek  <jakub at redhat.com>
++
++	PR target/41082
++	* config/rs6000/rs6000.c (rs6000_expand_vector_extract): Use stvx
++	instead of stve*x.
++	(altivec_expand_stv_builtin): For op0 use mode of operand 1 instead
++	of operand 0.
++	* config/rs6000/altivec.md (VI_scalar): New mode attr.
++	(altivec_stve<VI_char>x, *altivec_stvesfx): Use scalar instead of
++	vector mode for operand 0, put operand 1 into UNSPEC.
++
++2011-01-13  Nick Clifton  <nickc at redhat.com>
++
++	Import this fix from the mainline:
++	2010-10-19  Nick Clifton  <nickc at redhat.com>
++
++	* config/rx/rx.c (rx_function_value): Small integer types are
++	promoted to SImode.
++	(rx_promote_function_mode): New function.
++	(TARGET_PROMOTE_FUNCTION_MODE): Define.
++
 +2011-01-07  Rainer Orth  <ro at CeBiTec.Uni-Bielefeld.DE>
 +
 +	Backport from mainline:
@@ -567,18 +895,386 @@
  2010-12-16  Release Manager
  
  	* GCC 4.5.2 released.
+Index: gcc/testsuite/gcc.c-torture/compile/pr47150.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/compile/pr47150.c	(.../tags/gcc_4_5_2_release)	(wersja 0)
++++ gcc/testsuite/gcc.c-torture/compile/pr47150.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -0,0 +1,11 @@
++/* PR c/47150 */
++
++float _Complex foo (float, float);
++
++void
++bar ()
++{
++  float w = 2;
++  float _Complex b;
++  b = 0.5 * (foo (0, w) + foo (1, w) / w);
++}
 Index: gcc/testsuite/gcc.target/arm/pr45447.c
 ===================================================================
 --- gcc/testsuite/gcc.target/arm/pr45447.c	(.../tags/gcc_4_5_2_release)	(wersja 0)
-+++ gcc/testsuite/gcc.target/arm/pr45447.c	(.../branches/gcc-4_5-branch)	(wersja 168599)
++++ gcc/testsuite/gcc.target/arm/pr45447.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
 @@ -0,0 +1,3 @@
 +/* { dg-do compile } */
 +/* { dg-options "-g -femit-struct-debug-baseonly" } */
 +typedef __builtin_va_list x;
+Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -16,10 +16,11 @@
+   int i;
+   int m[8] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3), mask_v(4), mask_v(5), mask_v(6), mask_v(7)};
+   float s[8] = {1,2,3,4,5,6,7,8};
+-  union256 u, mask;
++  union256 u;
++  union256i_d mask;
+   float e [8] = {0.0};
+ 
+-  mask.x = _mm256_loadu_ps ((float*)m);
++  mask.x = _mm256_loadu_si256 ((__m256i *)m);
+   u.x = _mm256_maskload_ps (s, mask.x);
+ 
+   for (i = 0 ; i < 8; i++) 
+Index: gcc/testsuite/gcc.target/i386/pr46880.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pr46880.c	(.../tags/gcc_4_5_2_release)	(wersja 0)
++++ gcc/testsuite/gcc.target/i386/pr46880.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -0,0 +1,28 @@
++/* PR target/46880 */
++/* { dg-do run } */
++/* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
++/* { dg-require-effective-target sse2_runtime } */
++
++typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__));
++typedef double (*T)[2];
++
++static __attribute__ ((noinline, noclone)) __m128d
++foo (__m128d c, __m128d d)
++{
++  T cp = (T) &c;
++  T dp = (T) &d;
++  __m128d e = { (*cp)[1], (*dp)[1] };
++  return e;
++}
++
++int
++main ()
++{
++  __m128d c = { 1.0, 2.0 };
++  __m128d d = { 3.0, 4.0 };
++  union { __m128d x; double d[2]; } u;
++  u.x = foo (c, d);
++  if (u.d[0] != 2.0 || u.d[1] != 4.0)
++    __builtin_abort ();
++  return 0;
++}
+Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c	(.../tags/gcc_4_5_2_release)	(wersja 0)
++++ gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -0,0 +1,31 @@
++/* { dg-do run } */
++/* { dg-require-effective-target avx } */
++/* { dg-options "-O2 -mavx" } */
++
++#include "avx-check.h"
++
++#ifndef MASK
++#define MASK 134
++#endif
++
++#define mask_v(pos) (((MASK & (0x1 << (pos))) >> (pos)) << 31)
++
++void static
++avx_test (void)
++{
++  int i;
++  int m[4] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3)};
++  float s[4] = {1,2,3,4};
++  union128 u;
++  union128i_d mask;
++  float e[4] = {0.0};
++
++  mask.x = _mm_loadu_si128 ((__m128i *)m);
++  u.x = _mm_maskload_ps (s, mask.x);
++
++  for (i = 0 ; i < 4; i++) 
++    e[i] = m[i] ? s[i] : 0;
++   
++  if (check_union128 (u, e))
++    abort ();
++}
+Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c	(.../tags/gcc_4_5_2_release)	(wersja 169176)
++++ gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -14,12 +14,13 @@
+ avx_test (void)
+ {
+   int i;
+-  long long m[8] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3)};
++  long long m[4] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3)};
+   double s[4] = {1.1, 2.2, 3.3, 4.4};
+-  union256d u, mask;
++  union256d u;
++  union256i_q mask;
+   double e [4] = {0.0};
+ 
+-  mask.x = _mm256_loadu_pd ((double*)m);
++  mask.x = _mm256_loadu_si256 ((__m256i *)m);
+   u.x = _mm256_maskload_pd (s, mask.x);
+ 
+   for (i = 0 ; i < 4; i++) 
+Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c	(.../tags/gcc_4_5_2_release)	(wersja 0)
++++ gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c	(.../branches/gcc-4_5-branch)	(wersja 169176)
+@@ -0,0 +1,31 @@
++/* { dg-do run } */
++/* { dg-require-effective-target avx } */
++/* { dg-options "-O2 -mavx" } */
++
++#include "avx-check.h"
++
++#ifndef MASK
++#define MASK 7
++#endif
++
++#define mask_v(pos) (((MASK & (0x1ULL << (pos))) >> (pos)) << 63)
++
++void static
++avx_test (void)
++{
++  int i;
++  long long m[2] = {mask_v(0), mask_v(1)};
++  double s[2] = {1.1, 2.2};
++  union128d u;
++  union128i_q mask;
++  double e[2] = {0.0};
++
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gcc/gcc-branch.diff?r1=1.41&r2=1.42&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gcc/gcc.spec?r1=1.645&r2=1.646&f=u



More information about the pld-cvs-commit mailing list