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

            Bug ID: 121251
           Summary: Shift and rotates with bitint on rhs
           Product: gcc
           Version: 14.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, internal-improvement
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
typedef unsigned _BitInt(128) u128;
u128 c;
void __GIMPLE rotate_left(const u128 a, const u128 b)
{
  u128 _1;
  unsigned _2;
  _2 = (unsigned)b;
  _1 = a __ROTATE_LEFT b;
  c = _1;
}
```

This will ICE because the bitlower pass does not understand/lower bitint on the
rhs of rotates or shifts.
I think it is best to have this as a gimple verifier instead of fixing bitlower
pass.

This came up when helping some of the rust front-end folks in adding 128bit
integer support for ia32 via bitint.

Reply via email to