Hi, This is a fix for pr95199. In vectorization, vinfo->ivexpr_map is supposed to catch those "IV base and/or step expressions". Just call cse_and_gimplify_to_preheader to handle gathering/scattering to avoid the extra variable.
Bootstrap and tested on aarch64/x86_64 Linux platform. No new regression witnessed. Is it ok? Thanks, Kaipeng Zhou
0001-vect-Remove-extra-variable-created-for-memory-refere.patch
Description: 0001-vect-Remove-extra-variable-created-for-memory-refere.patch