mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
be more aggressive about transforming add -> or when the operands have no
intersecting bits. This triggers all over the place, for example in lencode, with adds of stuff like: %tmp580 = mul i32 %tmp579, 2 %tmp582 = and i32 %b8, 1 and %tmp28 = shl i32 %abs.i, 1 %sign.0 = select i1 %tmp23, i32 1, i32 0 and %tmp344 = shl i32 %tmp343, 2 %tmp346 = and i32 %tmp96, 3 etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,3 +29,18 @@ EntryBlock:
|
||||
|
||||
declare i32 @callee(i32)
|
||||
|
||||
|
||||
define i32 @test3(i32 %A) {
|
||||
%B = and i32 %A, 7
|
||||
%C = and i32 %A, 32
|
||||
%F = add i32 %B, %C
|
||||
ret i32 %F
|
||||
}
|
||||
|
||||
define i32 @test4(i32 %A) {
|
||||
%B = and i32 %A, 128
|
||||
%C = lshr i32 %A, 30
|
||||
%F = add i32 %B, %C
|
||||
ret i32 %F
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user