https://gcc.gnu.org/g:565d4e755498ad2b5ed55e368ef61eb9511cda3a
commit r15-7594-g565d4e755498ad2b5ed55e368ef61eb9511cda3a Author: Uros Bizjak <ubiz...@gmail.com> Date: Mon Feb 17 20:47:14 2025 +0100 i386: Simplify PARALLEL RTX scan in ix86_find_all_reg_use UNSPEC and UNSPEC_VOLATILE never store. Remove unnecessary checks and simplify RTX scan in ix86_find_all_reg_use to scan only for SET RTX in the PARALLEL. gcc/ChangeLog: * config/i386/i386.cc (ix86_find_all_reg_use): Scan only for SET RTX in PARALLEL. Diff: --- gcc/config/i386/i386.cc | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index fafd4a511a3c..560e6525b56b 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -8538,31 +8538,9 @@ ix86_find_all_reg_use (HARD_REG_SET &stack_slot_access, for (int i = 0; i < XVECLEN (pat, 0); i++) { rtx exp = XVECEXP (pat, 0, i); - switch (GET_CODE (exp)) - { - case ASM_OPERANDS: - case CLOBBER: - case PREFETCH: - case USE: - break; - case UNSPEC: - case UNSPEC_VOLATILE: - for (int j = XVECLEN (exp, 0) - 1; j >= 0; j--) - { - rtx x = XVECEXP (exp, 0, j); - if (GET_CODE (x) == SET) - ix86_find_all_reg_use_1 (x, stack_slot_access, - worklist); - } - break; - case SET: - ix86_find_all_reg_use_1 (exp, stack_slot_access, - worklist); - break; - default: - gcc_unreachable (); - break; - } + + if (GET_CODE (exp) == SET) + ix86_find_all_reg_use_1 (exp, stack_slot_access, worklist); } } }