https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101390
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jennifer Schmitz <jschm...@gcc.gnu.org>: https://gcc.gnu.org/g:9bbad3685131ec95d970f81bf75f9556d4d92742 commit r15-3082-g9bbad3685131ec95d970f81bf75f9556d4d92742 Author: Jennifer Schmitz <jschm...@nvidia.com> Date: Wed Aug 7 08:56:45 2024 -0700 PR tree-optimization/101390: Vectorize modulo operator This patch adds a new vectorization pattern that detects the modulo operation where the second operand is a variable. It replaces the statement by division, multiplication, and subtraction. The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. Ok for mainline? Signed-off-by: Jennifer Schmitz <jschm...@nvidia.com> gcc/ PR tree-optimization/101390 * tree-vect-patterns.cc (vect_recog_mod_var_pattern): Add new pattern. gcc/testsuite/ PR tree-optimization/101390 * gcc.dg/vect/vect-mod-var.c: New test. * gcc.target/aarch64/sve/mod_1.c: Likewise. * lib/target-supports.exp: New selector expression.