diff options
author | Asaf Badouh <asaf.badouh@intel.com> | 2017-01-30 13:14:37 +0000 |
---|---|---|
committer | Asaf Badouh <asaf.badouh@intel.com> | 2017-01-30 13:14:37 +0000 |
commit | e11d2d73bf05528ffdc33536d78e2ac441096a8c (patch) | |
tree | fa7c5750e228f4b9d03d26be1b83efb6da7532d5 /llvm/test | |
parent | e81adb52b17d405624356b5b280dbcf195adc937 (diff) | |
download | bcm5719-llvm-e11d2d73bf05528ffdc33536d78e2ac441096a8c.tar.gz bcm5719-llvm-e11d2d73bf05528ffdc33536d78e2ac441096a8c.zip |
[X86][MCU] Minor bug fix for r293469 + test case
llvm-svn: 293478
Diffstat (limited to 'llvm/test')
-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 |