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 | 0c1aec18911f2a67fb37b6593d08f4f8cb7e18ef (patch) | |
tree | a346697018de0bd5a92cfb7166ec96eafeb60418 /test | |
parent | db934e747485cc9b4378a02c6d6a47fc83657996 (diff) | |
download | llvm-0c1aec18911f2a67fb37b6593d08f4f8cb7e18ef.tar.gz llvm-0c1aec18911f2a67fb37b6593d08f4f8cb7e18ef.tar.bz2 llvm-0c1aec18911f2a67fb37b6593d08f4f8cb7e18ef.tar.xz |
bfi A, (and B, C1), C2) -> bfi A, B, C2 iff C1 & C2 == C1. rdar://8458663
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ARM/bfi.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/bfi.ll b/test/CodeGen/ARM/bfi.ll index 157c90c753..946db1909f 100644 --- a/test/CodeGen/ARM/bfi.ll +++ b/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 +} |