diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/select.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/select.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/select.ll b/llvm/test/CodeGen/X86/select.ll index caf9d2384f2..e6cce778b21 100644 --- a/llvm/test/CodeGen/X86/select.ll +++ b/llvm/test/CodeGen/X86/select.ll @@ -678,3 +678,17 @@ entry: %1 = select i1 %cmp10, i32 %A, i32 %0 ret i32 %1 } + +define i32 @select_or_1(i32 %A, i32 %B, i32 %cond) { +; CHECK-LABEL: select_or_1: +; MCU: andl $1, %ecx +; MCU-NEXT: negl %ecx +; MCU-NEXT: andl %edx, %ecx +; MCU-NEXT: orl %ecx, %eax +entry: + %and = and i32 %cond, 1 + %cmp10 = icmp eq i32 %and, 0 + %0 = or i32 %B, %A + %1 = select i1 %cmp10, i32 %A, i32 %0 + ret i32 %1 +}
\ No newline at end of file |