https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110108
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by hongtao Liu <liuho...@gcc.gnu.org>: https://gcc.gnu.org/g:887f903ab05ddcac498247384734efbc6cf45147 commit r12-9686-g887f903ab05ddcac498247384734efbc6cf45147 Author: liuhongt <hongtao....@intel.com> Date: Mon Jun 5 12:38:41 2023 +0800 Explicitly view_convert_expr mask to signed type when folding pblendvb builtins. Since mask < 0 will be always false for vector char when -funsigned-char, but vpblendvb needs to check the most significant bit. The patch explicitly VCE to vector signed char. gcc/ChangeLog: PR target/110108 * config/i386/i386.cc (ix86_gimple_fold_builtin): Explicitly view_convert_expr mask to signed type when folding pblendvb builtins. gcc/testsuite/ChangeLog: * gcc.target/i386/pr110108-2.c: New test.