+2007-06-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/32216
+ * tree-vectorizer.c (supportable_widening_operation): Determine
+ signedness of FIX_TRUNC_EXPR from output operand.
+ (supportable_narrowing_operation): Ditto.
+ * tree-vect-generic.c (expand_vector_operations_1): Determine
+ signedness of VEC_UNPACK_FLOAT_HI_EXPR and VEC_UNPACK_FLOAT_LO_EXPR
+ from input operand.
+
2007-06-06 Thomas Neumann <tneumann@users.sourceforge.net>
* config/i386/i386.c (enum pta_flags): Move out of struct scope...
- (struct pta): ...from here. Change flags to unsigned to avoid excessive
- casting (as it is used as a bit mask).
+ (struct pta): ...from here. Change flags to unsigned to avoid
+ excessive casting (as it is used as a bit mask).
(override_options): Add casts according to the coding convenventions.
(x86_64_elf_unique_section): Likewise.
(examine_argument): Avoid using C++ keywords as variable names.
return TYPE_UNSIGNED (type) ? vec_pack_usat_optab : vec_pack_ssat_optab;
case VEC_PACK_FIX_TRUNC_EXPR:
+ /* The signedness is determined from output operand. */
return TYPE_UNSIGNED (type) ?
vec_pack_ufix_trunc_optab : vec_pack_sfix_trunc_optab;
+2007-06-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/32216
+ * gcc.dg/vect/pr32216.c: New test.
+
2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR testsuite/18923
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_floatint_cvt } */
+
+unsigned int wlookup2[203];
+
+SetSoundVariables (int x)
+{
+ for (x = 1; x < 32; x++)
+ {
+ wlookup2[x] = (double) 16 / x;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
return;
gcc_assert (code != CONVERT_EXPR);
+
+ /* The signedness is determined from input argument. */
+ if (code == VEC_UNPACK_FLOAT_HI_EXPR
+ || code == VEC_UNPACK_FLOAT_LO_EXPR)
+ type = TREE_TYPE (TREE_OPERAND (rhs, 0));
+
op = optab_for_tree_code (code, type);
/* For widening/narrowing vector operations, the relevant type is of the
- arguments, not the widened result. */
+ arguments, not the widened result. VEC_UNPACK_FLOAT_*_EXPR is
+ calculated in the same way above. */
if (code == WIDEN_SUM_EXPR
|| code == VEC_WIDEN_MULT_HI_EXPR
|| code == VEC_WIDEN_MULT_LO_EXPR
|| code == VEC_UNPACK_HI_EXPR
|| code == VEC_UNPACK_LO_EXPR
- || code == VEC_UNPACK_FLOAT_HI_EXPR
- || code == VEC_UNPACK_FLOAT_LO_EXPR
|| code == VEC_PACK_TRUNC_EXPR
|| code == VEC_PACK_SAT_EXPR
|| code == VEC_PACK_FIX_TRUNC_EXPR)
gcc_unreachable ();
}
- *code1 = c1;
- *code2 = c2;
- optab1 = optab_for_tree_code (c1, vectype);
- optab2 = optab_for_tree_code (c2, vectype);
+ if (code == FIX_TRUNC_EXPR)
+ {
+ /* The signedness is determined from output operand. */
+ optab1 = optab_for_tree_code (c1, type);
+ optab2 = optab_for_tree_code (c2, type);
+ }
+ else
+ {
+ optab1 = optab_for_tree_code (c1, vectype);
+ optab2 = optab_for_tree_code (c2, vectype);
+ }
if (!optab1 || !optab2)
return false;
|| insn_data[icode2].operand[0].mode != TYPE_MODE (wide_vectype))
return false;
+ *code1 = c1;
+ *code2 = c2;
return true;
}
gcc_unreachable ();
}
- *code1 = c1;
- optab1 = optab_for_tree_code (c1, vectype);
+ if (code == FIX_TRUNC_EXPR)
+ /* The signedness is determined from output operand. */
+ optab1 = optab_for_tree_code (c1, type);
+ else
+ optab1 = optab_for_tree_code (c1, vectype);
if (!optab1)
return false;
|| insn_data[icode1].operand[0].mode != TYPE_MODE (narrow_vectype))
return false;
+ *code1 = c1;
return true;
}