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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC can do this for switch expansion right now,
enum class E { a, b, c, d, e, f, g, h, i, j };

bool check_mask(E v) {
  switch (v) {
    case E::b: case E::e: case E::f: case E::j: return true;
    default: return false;
  }
}

        xorl    %eax, %eax
        cmpl    $9, %edi
        ja      .L1
        movl    $1, %eax
        movl    %edi, %ecx
        salq    %cl, %rax
        testl   $562, %eax
        setne   %al
.L1:
        ret

Reply via email to