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

            Bug ID: 123236
           Summary: `(signed)((unsigned long long)signed_var >> CST)` can
                    be simplified to `signed_var >> CST`
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
int
foo (int a)
{
  return (unsigned long long) a >> 4;
}

int
foo1 (int a)
{
  return a >> 4;
}
```

These 2 should produce the same code.

Noticed when looking into PR 123210.

Reply via email to