aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop-manip.cc
diff options
context:
space:
mode:
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>2023-07-06 14:51:35 +0800
committerPan Li <pan2.li@intel.com>2023-07-06 15:12:13 +0800
commitf2b37c8a38e44696287b19856bcbbf52e8b004f8 (patch)
tree6ee905f3e12addf1ed66ad67d2edb7d2456e210e /gcc/tree-vect-loop-manip.cc
parent2ab065c3e6950bc4995fcb16cebc5164d6213708 (diff)
downloadgcc-f2b37c8a38e44696287b19856bcbbf52e8b004f8.zip
gcc-f2b37c8a38e44696287b19856bcbbf52e8b004f8.tar.gz
gcc-f2b37c8a38e44696287b19856bcbbf52e8b004f8.tar.bz2
VECT: Fix ICE of variable stride on strieded load/store with SELECT_VL loop control.
Hi, Richi. Sorry for making mistake on LEN_MASK_GATHER_LOAD/LEN_MASK_SCATTER_STORE with SELECT_VL loop control. Consider this following case: void __attribute__ ((noinline, noclone)) \ f_##DATA_TYPE##_##BITS (DATA_TYPE *restrict dest, DATA_TYPE *restrict src, \ INDEX##BITS stride, INDEX##BITS n) \ { \ for (INDEX##BITS i = 0; i < n; ++i) \ dest[i] += src[i * stride]; \ } When "stride" is a constant, current flow works fine. However, when "stride" is a variable. It causes an ICE: ... _96 = .SELECT_VL (ivtmp_94, 4); ... ivtmp_78 = ((sizetype) _39 * (sizetype) _96) * 4; vect__11.69_87 = .LEN_MASK_GATHER_LOAD (vectp_src.67_85, _84, 4, { 0, 0, 0, 0 }, { -1, -1, -1, -1 }, _96, 0); ... vectp_src.67_86 = vectp_src.67_85 + ivtmp_78; Becase the IR: ivtmp_78 = ((sizetype) _39 * (sizetype) _96) * 4; Instead, I split the IR into: step_stride = _39 step = step_stride * 4 ivtmp_78 = step * _96 Thanks. gcc/ChangeLog: * tree-vect-stmts.cc (vect_get_strided_load_store_ops): Fix ICE.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions