aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDorit Nuzman <dorit@il.ibm.com>2007-09-12 07:09:38 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2007-09-12 07:09:38 +0000
commit220e82b4ef8828d304c75096ccef70ccbd1b6259 (patch)
tree18bb8c77492d8df34a4817732cf34d1240279236 /gcc
parentbf019a1f7f992a1feb985c4b656e527475e73a30 (diff)
downloadgcc-220e82b4ef8828d304c75096ccef70ccbd1b6259.zip
gcc-220e82b4ef8828d304c75096ccef70ccbd1b6259.tar.gz
gcc-220e82b4ef8828d304c75096ccef70ccbd1b6259.tar.bz2
re PR tree-optimization/33373 (ICE in vectorizable_type_demotion, at tree-vect-transform.c:4098)
PR tree-optimization/33373 * tree-vect-analyze (vect_determine_vectorization_factor): Call TREE_INT_CST_LOW when comparing TYPE_SIZE_UNIT. From-SVN: r128415
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr33373.c8
-rw-r--r--gcc/tree-vect-analyze.c7
4 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e74a823..049e6b6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-12 Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/33373
+ * tree-vect-analyze (vect_determine_vectorization_factor): Call
+ TREE_INT_CST_LOW when comparing TYPE_SIZE_UNIT.
+
2007-09-12 Jan Hubicka <jh@suse.cz>
PR target/33393
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e052589..894533a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-12 Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/33373
+ * gcc.dg/vect/pr33373.c: New test.
+
2007-09-12 Ben Elliston <bje@au.ibm.com>
* lib/target-supports.exp (check_effective_target_vect_no_double):
diff --git a/gcc/testsuite/gcc.dg/vect/pr33373.c b/gcc/testsuite/gcc.dg/vect/pr33373.c
new file mode 100644
index 0000000..b11cfb4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr33373.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+void DOSMEM_FillIsrTable(int*isr) {
+ int i;
+
+ for (i=0; i<256; i++)
+ isr[i]=(((short)((i*4) & 0xFFFF)) | (0xf000 & 0xFFFF) << 16);
+}
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index 557bf2f..51f0294 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -242,11 +242,12 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
operation = GIMPLE_STMT_OPERAND (stmt, 1);
if (TREE_CODE (operation) == NOP_EXPR
|| TREE_CODE (operation) == CONVERT_EXPR
- || TREE_CODE (operation) == WIDEN_MULT_EXPR)
+ || TREE_CODE (operation) == WIDEN_MULT_EXPR)
{
tree rhs_type = TREE_TYPE (TREE_OPERAND (operation, 0));
- if (TYPE_SIZE_UNIT (rhs_type) < TYPE_SIZE_UNIT (scalar_type))
- scalar_type = TREE_TYPE (TREE_OPERAND (operation, 0));
+ if (TREE_INT_CST_LOW (TYPE_SIZE_UNIT (rhs_type)) <
+ TREE_INT_CST_LOW (TYPE_SIZE_UNIT (scalar_type)))
+ scalar_type = rhs_type;
}
if (vect_print_dump_info (REPORT_DETAILS))