re PR middle-end/78684 (ICE in create_intersect_range_checks_index, at tree-vect-loop-manip.c:2074)

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
This commit is contained in:
Bin Cheng 2016-12-08 10:56:41 +00:00 committed by Bin Cheng
parent 1adc60671c
commit a5b03f2a17
4 changed files with 32 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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):

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,20 @@
// 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;
}

View File

@ -2070,8 +2070,7 @@ create_intersect_range_checks_index (loop_vec_info loop_vinfo, tree *cond_expr,
/* 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);