Commit 6d7971b8 by Richard Guenther Committed by Richard Biener

re PR middle-end/43390 (ICE: integral result type precision does not match…

re PR middle-end/43390 (ICE: integral result type precision does  not match field size of BIT_FIELD_REF)

2010-03-22  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43390
	* tree-vect-stmts.c (get_vectype_for_scalar_type): Make
	sure vector extracts are type correct.

	* gfortran.fortran-torture/execute/pr43390.f90: New testcase.

From-SVN: r157624
parent 6af84c85
2010-03-22 Richard Guenther <rguenther@suse.de> 2010-03-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43390
* tree-vect-stmts.c (get_vectype_for_scalar_type): Make
sure vector extracts are type correct.
2010-03-22 Richard Guenther <rguenther@suse.de>
PR middle-end/40106 PR middle-end/40106
* builtins.c (expand_builtin_pow): Expand pow (x, 1.5) as * builtins.c (expand_builtin_pow): Expand pow (x, 1.5) as
x * sqrt (x) even when optimizing for size if the target x * sqrt (x) even when optimizing for size if the target
......
2010-03-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43390
* gfortran.fortran-torture/execute/pr43390.f90: New testcase.
2010-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2010-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.target/powerpc/ppc-sdata-1.c: Require nonpic. * gcc.target/powerpc/ppc-sdata-1.c: Require nonpic.
......
logical :: l1(4)
logical :: l2(4)
l1 = (/.TRUE.,.FALSE.,.TRUE.,.FALSE./)
l2 = (/.FALSE.,.TRUE.,.FALSE.,.TRUE./)
if (dot_product (l1, l2)) call abort ()
l2 = .TRUE.
if (.not.dot_product (l1, l2)) call abort ()
end
...@@ -4417,6 +4417,14 @@ get_vectype_for_scalar_type (tree scalar_type) ...@@ -4417,6 +4417,14 @@ get_vectype_for_scalar_type (tree scalar_type)
if (nbytes < TYPE_ALIGN_UNIT (scalar_type)) if (nbytes < TYPE_ALIGN_UNIT (scalar_type))
return NULL_TREE; return NULL_TREE;
/* If we'd build a vector type of elements whose mode precision doesn't
match their types precision we'll get mismatched types on vector
extracts via BIT_FIELD_REFs. This effectively means we disable
vectorization of bool and/or enum types in some languages. */
if (INTEGRAL_TYPE_P (scalar_type)
&& GET_MODE_BITSIZE (inner_mode) != TYPE_PRECISION (scalar_type))
return NULL_TREE;
/* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD) /* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD)
is expected. */ is expected. */
nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes; nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment