void test_unsigned() {
  unsigned char x;
  x = 0;
  x++;
  x = 0;
  ++x;
  x = 0;
  x--;
  x = 0;
  --x;
  x = 1;
  x++;
  x = 1;
  ++x;
  x = 1;
  x--;
  x = 1;
  --x;
  x = 254;
  x++;
  x = 254;
  ++x;
  x = 254;
  x--;
  x = 254;
  --x;
  x = 255;
  x++;
  x = 255;
  ++x;
  x = 255;
  x--;
  x = 255;
  --x;
}


x86 assembly (clang, -O0):
<test_unsigned>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movb   $0x1,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0x1,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0x1,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movb   $0x1,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movb   $0xfe,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0xfe,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0xfe,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movb   $0xfe,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movb   $0xff,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0xff,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movb   $0xff,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movb   $0xff,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_unsigned>:
ret

LLVM IR (-O0):
define void @test_unsigned() {
%1 = alloca i8
store i8 0, i8* %1
%2 = load i8, i8* %1
%3 = add i8 %2, 1
store i8 %3, i8* %1
store i8 0, i8* %1
%4 = load i8, i8* %1
%5 = add i8 %4, 1
store i8 %5, i8* %1
store i8 0, i8* %1
%6 = load i8, i8* %1
%7 = add i8 %6, -1
store i8 %7, i8* %1
store i8 0, i8* %1
%8 = load i8, i8* %1
%9 = add i8 %8, -1
store i8 %9, i8* %1
store i8 1, i8* %1
%10 = load i8, i8* %1
%11 = add i8 %10, 1
store i8 %11, i8* %1
store i8 1, i8* %1
%12 = load i8, i8* %1
%13 = add i8 %12, 1
store i8 %13, i8* %1
store i8 1, i8* %1
%14 = load i8, i8* %1
%15 = add i8 %14, -1
store i8 %15, i8* %1
store i8 1, i8* %1
%16 = load i8, i8* %1
%17 = add i8 %16, -1
store i8 %17, i8* %1
store i8 -2, i8* %1
%18 = load i8, i8* %1
%19 = add i8 %18, 1
store i8 %19, i8* %1
store i8 -2, i8* %1
%20 = load i8, i8* %1
%21 = add i8 %20, 1
store i8 %21, i8* %1
store i8 -2, i8* %1
%22 = load i8, i8* %1
%23 = add i8 %22, -1
store i8 %23, i8* %1
store i8 -2, i8* %1
%24 = load i8, i8* %1
%25 = add i8 %24, -1
store i8 %25, i8* %1
store i8 -1, i8* %1
%26 = load i8, i8* %1
%27 = add i8 %26, 1
store i8 %27, i8* %1
store i8 -1, i8* %1
%28 = load i8, i8* %1
%29 = add i8 %28, 1
store i8 %29, i8* %1
store i8 -1, i8* %1
%30 = load i8, i8* %1
%31 = add i8 %30, -1
store i8 %31, i8* %1
store i8 -1, i8* %1
%32 = load i8, i8* %1
%33 = add i8 %32, -1
store i8 %33, i8* %1
ret void
}

LLVM IR (-O2):
define void @test_unsigned() {
ret void
}