PR middle-end/78684
* tree-vect-loop-manip.c (create_intersect_range_checks_index): Check
sign bit for index step of data reference.
gcc/testsuite
PR middle-end/78684
* g++.dg/torture/pr78684.C: New test.
From-SVN: r243431
+2016-12-08 Bin Cheng <bin.cheng@arm.com>
+
+ PR middle-end/78684
+ * tree-vect-loop-manip.c (create_intersect_range_checks_index): Check
+ sign bit for index step of data reference.
+
2016-12-08 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
* config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
+2016-12-08 Bin Cheng <bin.cheng@arm.com>
+
+ PR middle-end/78684
+ * g++.dg/torture/pr78684.C: New test.
+
2016-12-08 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
--- /dev/null
+// PR middle-end/78684
+// { dg-do compile }
+
+class a {
+public:
+ a(long);
+ void operator<<=(long) {
+ long b;
+ for (unsigned long c; c; c--)
+ d[c + b] = d[c];
+ }
+ a &g();
+ long d[28];
+};
+long e;
+int f;
+void j() {
+ a h(e), i = h;
+ i.g() <<= f;
+}
/* Index must have const step, otherwise DR_STEP won't be constant. */
gcc_assert (TREE_CODE (idx_step) == INTEGER_CST);
/* Index must evaluate in the same direction as DR. */
- gcc_assert (!neg_step
- || tree_int_cst_compare (idx_step, size_zero_node) < 0);
+ gcc_assert (!neg_step || tree_int_cst_sign_bit (idx_step) == 1);
tree min1 = CHREC_LEFT (access1);
tree min2 = CHREC_LEFT (access2);