Patch for PR target/32218 (ice-on-valid-code, IA64 vectorization)
Steve Ellcey
sje@cup.hp.com
Wed Jul 25 17:28:00 GMT 2007
PR target/32218 is an ice-on-valid-code problem where we call TYPE_MODE
with the result of get_vectype_for_scalar_type.
get_vectype_for_scalar_type can return a NULL_TREE if there is no
vectype for a particular scalar type and if we call TYPE_MODE with
NULL_TREE we will get an ICE. This patch checks the result of
get_vectype_for_scalar_type before using it.
OK for checkin?
Steve Ellcey
sje@cup.hp.com
2007-07-25 Steve Ellcey <sje@cup.hp.com>
* tree-vect-patterns.c (vect_pattern_recog_1): Check for valid type.
Index: tree-vect-patterns.c
===================================================================
--- tree-vect-patterns.c (revision 126897)
+++ tree-vect-patterns.c (working copy)
@@ -651,8 +651,9 @@ vect_pattern_recog_1 (
|| (icode = optab->handlers[(int) vec_mode].insn_code) ==
CODE_FOR_nothing
|| (type_out
- && (insn_data[icode].operand[0].mode !=
- TYPE_MODE (get_vectype_for_scalar_type (type_out)))))
+ && (!get_vectype_for_scalar_type (type_out)
+ || (insn_data[icode].operand[0].mode !=
+ TYPE_MODE (get_vectype_for_scalar_type (type_out))))))
return;
}
More information about the Gcc-patches
mailing list