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

            Bug ID: 126297
           Summary: [17 Regression] Minor SH testsuite failure after
                    recent change
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at gcc dot gnu.org
  Target Milestone: ---

This change causes a sh testsuite regression:

commit e46d96d20bbfa786d30c9371631da00939845f05 (HEAD)
Author: Roger Sayle <[email protected]>
Date:   Wed Jul 15 12:26:16 2026 +0100

    PR middle-end/123236: Simplify (int)((long long)x >> 4)

    This patch addresses a code quality regression on x86_64 related to
    PR 123236.  That original PR (and the related PR 101266) concern tree
    level optimizations, where this problem should also be fixed, but it
    also reveals a regression in the RTL optimizers.

    A motivating test case (on x86_64) is:

    int bar(int a) {
      long long t = a;
      return t >> 4;
    }
[ ... ]

On sh3-linux-gnu and sh3eb-linux-gnu:

Tests that now fail, but worked before (1 tests):

gcc: gcc.target/sh/pr64345-1.c scan-assembler-times shlr\t 8

If I diff the assembly before/after it looks like we're turning a shifts into
bit tests.  That's probably an improvement, but I couldn't say with 100%
certainty.

Reply via email to