https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111285
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:ad0084337e901ddaedd48c14e7a5dad9fc2a093e commit r15-4715-gad0084337e901ddaedd48c14e7a5dad9fc2a093e 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>