mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user