https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97445
--- Comment #51 from Martin Liška <marxin at gcc dot gnu.org> --- > Martin, how does the if chain conversion behave on the example? I don't see how can if-to-switch conversion pass help us here. It's designed to identify compact intervals. In this case we see: <bb 12> : _16 = _2 & 576460752303423488; if (_16 == 0) goto <bb 13>; [INV] else goto <bb 72>; [INV] <bb 13> : _18 = _2 & 288230376151711744; if (_18 == 0) goto <bb 14>; [INV] else goto <bb 72>; [INV] ... So it's a series of masking. Do you see Honza how to convert it?