https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104441
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>: https://gcc.gnu.org/g:5390a2f191682dae3c6d1e1deac20e05be413514 commit r12-7125-g5390a2f191682dae3c6d1e1deac20e05be413514 Author: H.J. Lu <hjl.to...@gmail.com> Date: Sun Jan 30 10:08:14 2022 -0800 x86: Check each component of source operand for AVX_U128_DIRTY commit 9775e465c1fbfc32656de77c618c61acf5bd905d Author: H.J. Lu <hjl.to...@gmail.com> Date: Tue Jul 27 07:46:04 2021 -0700 x86: Don't set AVX_U128_DIRTY when zeroing YMM/ZMM register called ix86_check_avx_upper_register to check mode on source operand. But ix86_check_avx_upper_register doesn't work on source operand like (vec_select:V2DI (reg/v:V4DI 23 xmm3 [orig:91 ymm ] [91]) (parallel [ (const_int 2 [0x2]) (const_int 3 [0x3]) ])) Add ix86_avx_u128_mode_source to check mode for each component of source operand. gcc/ PR target/104441 * config/i386/i386.cc (ix86_avx_u128_mode_source): New function. (ix86_avx_u128_mode_needed): Return AVX_U128_ANY for debug INSN. Call ix86_avx_u128_mode_source to check mode for each component of source operand. gcc/testsuite/ PR target/104441 * gcc.target/i386/pr104441-1a.c: New test. * gcc.target/i386/pr104441-1b.c: Likewise.