diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-12-14 03:22:07 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-12-14 03:22:07 +0000 |
| commit | c17781375532ce9974cb83408b03d88e47d1b3a8 (patch) | |
| tree | 34e747764d0419730e20867ca8eac2a709fa6638 /llvm/test/CodeGen/ARM | |
| parent | 8b2fe6dcbdf27b0df84ef4bdf514f9bc577c5804 (diff) | |
| download | bcm5719-llvm-c17781375532ce9974cb83408b03d88e47d1b3a8.tar.gz bcm5719-llvm-c17781375532ce9974cb83408b03d88e47d1b3a8.zip | |
bfi A, (and B, C1), C2) -> bfi A, B, C2 iff C1 & C2 == C1. rdar://8458663
llvm-svn: 121746
Diffstat (limited to 'llvm/test/CodeGen/ARM')
| -rw-r--r-- | llvm/test/CodeGen/ARM/bfi.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/bfi.ll b/llvm/test/CodeGen/ARM/bfi.ll index 157c90c7531..946db1909fe 100644 --- a/llvm/test/CodeGen/ARM/bfi.ll +++ b/llvm/test/CodeGen/ARM/bfi.ll @@ -49,3 +49,16 @@ define i32 @f4(i32 %a) nounwind { %ins12 = or i32 %ins7, 3137 ret i32 %ins12 } + +; rdar://8458663 +define i32 @f5(i32 %a, i32 %b) nounwind { +entry: +; CHECK: f5: +; CHECK-NOT: bfc +; CHECK: bfi r0, r1, #20, #4 + %0 = and i32 %a, -15728641 + %1 = shl i32 %b, 20 + %2 = and i32 %1, 15728640 + %3 = or i32 %2, %0 + ret i32 %3 +} |

