1; RUN: llc < %s -march=x86 -mattr=+cmov | FileCheck %s
2; Both values were being zero extended.
3@u = external global i8
4@s = external global i8
5define i32 @foo(i1 %cond) {
6; CHECK: @foo
7  %u_base = load i8, i8* @u
8  %u_val = zext i8 %u_base to i32
9; CHECK: movzbl
10; CHECK: movsbl
11  %s_base = load i8, i8* @s
12  %s_val = sext i8 %s_base to i32
13  %val = select i1 %cond, i32 %u_val, i32 %s_val
14  ret i32 %val
15}
16