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

duanbo (C) duanbo3@huawei.com
Wed Aug 26 09:30:13 GMT 2020


Hi, 

This is a fix for PR96757.
Before vect pass, the main statements of the test case will be optimized like:
	_1 = d_10(D) > 3;
	_2 = a_11(D) > m_12(D);
	_18 = _1 > _2 ? _26 : 0; 
At the beginning of vectorization analysis, function vect_recog_mask_conversion_pattern 
processed the gimple  _18 = _1 > _2 ? _15 : 0, and produce:
	patt_17 = _1 > _2
	patt_3 = patt_17 ? _15 : 0
it didn't consider the situation that  _1, _2's vectype is different, which leading to an ICE in 
some special  mode , like V4HImode for this case.

This patch added the identification and handling for this situation in vect_recog_mask_conversion_pattern. 
With that _18 = _1 > _2 ? _15 : 0 will be transformed to:
	patt_3 = (<signed-boolean:16>) _2;
	patt_17 = _1 > patt_3;
	patt_20 = patt_17 ? _26 : 0;

More details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96757.
Bootstrap and tested on both aarch64 and x86 Linux platform, no new regression witnessed.
Ok for trunk?

Thanks, 
Duan Bo
	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr95767.patch
Type: application/octet-stream
Size: 3240 bytes
Desc: pr95767.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200826/7ff14028/attachment-0001.obj>


More information about the Gcc-patches mailing list