Expand i8 selects into control flow instead of 16-bit conditional
[oota-llvm.git] / test / CodeGen / X86 / select-i8.ll
1 ; RUN: llvm-as < %s | llc -march=x86 > %t
2 ; RUN: not grep movz %t
3 ; RUN: not grep cmov %t
4 ; RUN: grep movb %t | count 2
5
6 ; Don't try to use a 16-bit conditional move to do an 8-bit select,
7 ; because it isn't worth it. Just use a branch instead.
8
9 define i8 @foo(i1 inreg %c, i8 inreg %a, i8 inreg %b) {
10   %d = select i1 %c, i8 %a, i8 %b
11   ret i8 %d
12 }