https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111285
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:df76d7b05693dc511a114cb6ece2cbc5eef25dea commit r12-11049-gdf76d7b05693dc511a114cb6ece2cbc5eef25dea Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Sun Oct 27 13:16:22 2024 -0700 vec-lowering: Fix ABSU lowering [PR111285] ABSU_EXPR lowering incorrectly used the resulting type for the new expression but in the case of ABSU the resulting type is an unsigned type and with ABSU is folded away. The fix is to use a signed type for the expression instead. Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/111285 gcc/ChangeLog: * tree-vect-generic.cc (do_unop): Use a signed type for the operand if the operation was ABSU_EXPR. gcc/testsuite/ChangeLog: * g++.dg/torture/vect-absu-1.C: New test. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com> (cherry picked from commit ad0084337e901ddaedd48c14e7a5dad9fc2a093e)