[PATCH PR96698] aarch64: ICE during GIMPLE pass:vect

yangyang (ET) yangyang305@huawei.com
Thu Aug 20 02:44:49 GMT 2020


Hi, 

	This is a simple fix for PR96698.

	For the test case, there are two PHIs in the inner loop in pass_vect

		<bb 5> [local count: 719407024]:
		# b_26 = PHI <0(4), b_15(10)>
		# c_27 = PHI <0(4), b_26(10)>

	c_27 = PHI <0(4), b_26(10)> is detected to be a vectorizable nested cycle by vect_is_simple_reduction incorrectly, and # b_26 = PHI <0(4), b_15(10)> is marked as the reduc_def of it, resulting in the crash.

	This patch adjusts the order of judgements in vect_is_simple_reduction to avoid the incorrect detection.

	Added one testcase for this. Bootstrap and tested on both aarch64 and x86 Linux platform, no new regression witnessed.

	Ok for trunk?`

Thanks, 
Yang Yang


+2020-08-20  Yang Yang  <yangyang305@huawei.com>
+
+       PR tree-optimization/96698
+       * tree-vect-loop.c (vect_is_simple_reduction): Moves the analysis
+       of phi nodes above the analysis of nested cycle to avoid the
+       incorrect detection.
+

+2020-08-20  Yang Yang  <yangyang305@huawei.com>
+
+       PR tree-optimization/96698
+       * gcc.dg/pr96698.c: New test.
+

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr96698-v1.patch
Type: application/octet-stream
Size: 3754 bytes
Desc: pr96698-v1.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200820/254ccfc6/attachment.obj>


More information about the Gcc-patches mailing list