--- /dev/null
+/* Test that we do not have ice when compile */
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize" } */
+
+long a, b;
+extern short c[];
+
+void d() {
+ for (int e = 0; e < 35; e = 2) {
+ a = ({ a < 0 ? a : 0; });
+ b = ({ b < 0 ? b : 0; });
+
+ c[e] = 0;
+ }
+}
? &LOOP_VINFO_LENS (loop_vinfo)
: NULL);
- /* Shouldn't go with length-based approach if fully masked. */
- gcc_assert (!loop_lens || !loop_masks);
+ /* The vect_transform_stmt and vect_analyze_stmt will go here but there
+ are some difference here. We cannot enable both the lens and masks
+ during transform but it is allowed during analysis.
+ Shouldn't go with length-based approach if fully masked. */
+ if (cost_vec == NULL)
+ /* The cost_vec is NULL during transfrom. */
+ gcc_assert ((!loop_lens || !loop_masks));
/* Targets with store-lane instructions must not require explicit
realignment. vect_supportable_dr_alignment always returns either
? &LOOP_VINFO_LENS (loop_vinfo)
: NULL);
- /* Shouldn't go with length-based approach if fully masked. */
- gcc_assert (!loop_lens || !loop_masks);
+ /* The vect_transform_stmt and vect_analyze_stmt will go here but there
+ are some difference here. We cannot enable both the lens and masks
+ during transform but it is allowed during analysis.
+ Shouldn't go with length-based approach if fully masked. */
+ if (cost_vec == NULL)
+ /* The cost_vec is NULL during transfrom. */
+ gcc_assert ((!loop_lens || !loop_masks));
/* Targets with store-lane instructions must not require explicit
realignment. vect_supportable_dr_alignment always returns either