[Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield

2023-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Macleod from comment #2) > > Why are we adding -1 to [0,3] ? Thats the root of this issue I think? > seems strange if we ignore the range for a second. When switch conversion

[Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield

2023-08-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield

2023-04-26 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 --- Comment #5 from Andrew Macleod --- Perhaps switch conv just needs to look at it...

[Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield

2023-04-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Macleod from comment #3) > we know the range of _2 is [0, 3].. wonder why we don't know that about > _1... having a look I assume the range of _1 is [-INF, +INF] (aka [0, 3] aka

[Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield

2023-04-26 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 --- Comment #3 from Andrew Macleod --- Just to add: 040.evrp: _2 : [irange] int [0, 3] NONZERO 0x3 _3 : [irange] int [0, 3] NONZERO 0x3 : _1 = s_5(D)->x; _2 = (int) _1; switch (_1) [INV], case 1: [INV], case 2: [INV], case 3:

[Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield

2023-04-26 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 Andrew Macleod changed: What|Removed |Added CC||amacleod at redhat dot com ---

[Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield

2023-04-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-04-26