https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128692
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Avinash Jayakar <[email protected]>: https://gcc.gnu.org/g:e72a9ecbd8c8446e8b33906af3a772f4a76de0a0 commit r17-6724-ge72a9ecbd8c8446e8b33906af3a772f4a76de0a0 Author: Avinash Jayakar <[email protected]> Date: Wed Nov 18 14:05:09 2026 +0530 rs6000: Set length for P10 fusion TOC patterns [PR128692] The *largetocp10 patterns expand to two instructions (addis/addi or addis/la) but did not specify a length attribute, so they inherited the default length of four bytes. In large functions this made shorten_branches underestimate the distance to labels after such TOC address materializations. With -mtune=power10, which enables POWER10 fusion even on older CPUs, conditional branches that were actually outside the +/-32KB branch range could be emitted as short branches, causing assembler errors such as: Error: operand out of range (0x8138 is not between ...) Set the length of the four affected patterns to eight bytes. Assisted-by: LLM for testcase generation 2026-11-18 Avinash Jayakar <[email protected]> gcc/ChangeLog: PR target/128692 * config/rs6000/rs6000.md (*largetocp10): Set length to 8. (*largetocp10_aix<mode>): Likewise. (*largetocp10_plus): Likewise. (*largetocp10_plus_aix<mode>): Likewise. gcc/testsuite/ChangeLog: PR target/128692 * gcc.target/powerpc/pr128692.c: New test.
