void testAdjustment(int t) {
  switch (t + 1) {
  case 2:
    clang_analyzer_eval(t == 1);
    break;
  case 3 ... 10:
    clang_analyzer_eval(t > 1);
    clang_analyzer_eval(t + 2 <= 11);
    clang_analyzer_eval(t > 2);
    clang_analyzer_eval(t + 1 == 3);
    clang_analyzer_eval(t + 1 == 10);
    break;
  default:
    clang_analyzer_warnIfReached();
  }
}


x86 assembly (clang, -O0):
<testAdjustment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
sub    $0x2,%eax
je     1156 <testAdjustment+0x36>
jmp    1142 <testAdjustment+0x22>
mov    -0x8(%rbp),%eax
add    $0xfffffffd,%eax
sub    $0x8,%eax
jb     116e <testAdjustment+0x4e>
jmp    11e1 <testAdjustment+0xc1>
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <clang_analyzer_eval@plt>
jmp    11e8 <testAdjustment+0xc8>
cmpl   $0x1,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    $0xb,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <clang_analyzer_eval@plt>
cmpl   $0x2,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <clang_analyzer_eval@plt>
jmp    11e8 <testAdjustment+0xc8>
mov    $0x0,%al
call   1040 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAdjustment>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    -0x2(%rbx),%eax
cmp    $0x8,%eax
jae    117e <testAdjustment+0x5e>
lea    0x1(%rbx),%ebp
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x3,%ebx
setae  %dil
xor    %eax,%eax
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x3,%ebp
sete   %dil
xor    %eax,%eax
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0xa,%ebp
sete   %dil
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>
cmp    $0x1,%ebx
jne    118a <testAdjustment+0x6a>
mov    $0x1,%edi
jmp    1171 <testAdjustment+0x51>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <clang_analyzer_warnIfReached@plt>

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

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