void test(int i) {
  switch (i) {
  case 0:
    __analyzer_eval(i == 0);
    break;
  case 3 ... 5:
    __analyzer_eval(i >= 3);
    __analyzer_eval(i <= 5);
    break;
  default:
    __analyzer_eval(i == 0);
    __analyzer_eval(i == 2);
    __analyzer_eval(i == 3);
    __analyzer_eval(i == 4);
    __analyzer_eval(i == 5);
    __analyzer_eval(i == 6);
    break;
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1142 <test+0x32>
jmp    112e <test+0x1e>
mov    -0x8(%rbp),%eax
add    $0xfffffffd,%eax
sub    $0x3,%eax
jb     115a <test+0x4a>
jmp    1185 <test+0x75>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
jmp    11f7 <test+0xe7>
cmpl   $0x3,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
cmpl   $0x5,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
jmp    11f7 <test+0xe7>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
cmpl   $0x4,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
cmpl   $0x5,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
cmpl   $0x6,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    -0x3(%rbx),%eax
mov    $0x1,%ebp
cmp    $0x3,%eax
jae    1130 <test+0x20>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <__analyzer_eval@plt>
jmp    1175 <test+0x65>
test   %ebx,%ebx
je     1175 <test+0x65>
sete   %al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x2,%ebx
sete   %dil
xor    %eax,%eax
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1030 <__analyzer_eval@plt>
xor    %ebp,%ebp
cmp    $0x6,%ebx
sete   %bpl
mov    %ebp,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %18 [
i32 0, label %4
i32 3, label %9
i32 4, label %9
i32 5, label %9
]
4: ; preds = %1
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %7)
br label %43
9: ; preds = %1, %1, %1
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 3
%12 = zext i1 %11 to i32
%13 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %12)
%14 = load i32, i32* %2
%15 = icmp sle i32 %14, 5
%16 = zext i1 %15 to i32
%17 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %16)
br label %43
18: ; preds = %1
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 0
%21 = zext i1 %20 to i32
%22 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %21)
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 2
%25 = zext i1 %24 to i32
%26 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %25)
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 3
%29 = zext i1 %28 to i32
%30 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %29)
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 4
%33 = zext i1 %32 to i32
%34 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %33)
%35 = load i32, i32* %2
%36 = icmp eq i32 %35, 5
%37 = zext i1 %36 to i32
%38 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %37)
%39 = load i32, i32* %2
%40 = icmp eq i32 %39, 6
%41 = zext i1 %40 to i32
%42 = call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %41)
br label %43
43: ; preds = %18, %9, %4
ret void
}

LLVM IR (-O2):
define void @test(i32 %0) {
switch i32 %0, label %4 [
i32 0, label %16
i32 3, label %2
i32 4, label %2
i32 5, label %2
]
2: ; preds = %1, %1, %1
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 1)
br label %16
4: ; preds = %1
%5 = icmp eq i32 %0, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %6)
%8 = icmp eq i32 %0, 2
%9 = zext i1 %8 to i32
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %9)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 0)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 0)
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 0)
%14 = icmp eq i32 %0, 6
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %1, %4, %2
%17 = phi i32 [ %15, %4 ], [ 1, %2 ], [ 1, %1 ]
%18 = tail call i32 (i32, ...) bitcast (i32 (...)* @__analyzer_eval to i32 (i32, ...)*)(i32 %17)
ret void
}