https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123117
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Robin Dapp <[email protected]>: https://gcc.gnu.org/g:e8fd095091ebfc0c4adc1c7f6607ab30b25b3a05 commit r16-6292-ge8fd095091ebfc0c4adc1c7f6607ab30b25b3a05 Author: Robin Dapp <[email protected]> Date: Mon Dec 15 13:01:40 2025 +0100 forwprop: Check type conversion in pack/unpack [PR123117]. When using pack or unpack in the simplification of a vector constructor we must make sure that the original BIT_FIELD_REF was no sign-changing nop conversion. If it was we cannot safely pack/unpack as that would skip sign or zero extensions. This patch adds useless_type_conversion_p to both paths. PR tree-optimization/123117 gcc/ChangeLog: * tree-ssa-forwprop.cc (simplify_vector_constructor): Check if we had a nop conversion and don't use pack/unpack in that case. gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lsx/pr123117.c: New test.
