https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99293
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Michael Meissner <[email protected]>: https://gcc.gnu.org/g:997aaa14a9500bfdbe28ec114f953f62e9c1c89e commit r16-9606-g997aaa14a9500bfdbe28ec114f953f62e9c1c89e Author: Michael Meissner <[email protected]> Date: Thu Aug 27 12:25:47 2026 -0400 Backport PR target/99293 We had optimizations for splat of a vector extract for the other vector types, but we missed having one for V2DI and V2DF. This patch adds a combiner insn to do this optimization. In looking at the source, we had similar optimizations for V4SI and V4SF extract and splats, but we missed doing V2DI/V2DF. Without the patch for the code: vector long long splat_dup_l_0 (vector long long v) { return __builtin_vec_splats (__builtin_vec_extract (v, 0)); } the compiler generates (on a little endian power9): splat_dup_l_0: mfvsrld 9,34 mtvsrdd 34,9,9 blr Now it generates: splat_dup_l_0: xxpermdi 34,34,34,3 blr This change was backported from the changes checked into the master branch on 2026-08-03. 2026-08-27 Michael Meissner <[email protected]> gcc/ PR target/99293 * config/rs6000/vsx.md (vsx_splat_extract_<mode>): New insn. gcc/testsuite/ PR target/99293 * gcc.target/powerpc/pr99293.c: New test.
