This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/84436] Missed optimization with switch on enum constants returning the same value


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

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
Note that this is good for identity, but we could also turn a map 0->3, 1->4,
5->8 into x->x+3, or generally any map (with an unreachable default case) into
a polynomial (or some other simple function), the cost of which might be higher
or lower than the jump table. It probably isn't worth going too far in that
direction though.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]