[Bug tree-optimization/125672] New: Jump threading hurts conditional select formation

ktkachov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 8 13:46:30 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125672

            Bug ID: 125672
           Summary: Jump threading hurts conditional select formation
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---

Created attachment 64676
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64676&action=edit
Testcase demonstrating excessive conditional branches

Looking at SPEC2026 performance, the astcenc performance improves by ~14% on an
aarch64 machine if compiled with -fno-thread-jumps with -Ofast -flto.
The problem seems like a function with many operations that should be converted
to FP CSEL operations (FCSEL on aarch64) but jump threading jumbles up the
basic blocks and phiopt fails to handle them.
I'm attaching a reproducer that shows the effect with and without
-fno-thread-jumps


More information about the Gcc-bugs mailing list