InstCombine: If we call llvm.objectsize on a malloc call we can replace it with the...
[oota-llvm.git] / test / Transforms / InstCombine / add2.ll
1 ; RUN: opt < %s -instcombine -S | not grep add
2
3 define i64 @test1(i64 %A, i32 %B) {
4         %tmp12 = zext i32 %B to i64
5         %tmp3 = shl i64 %tmp12, 32
6         %tmp5 = add i64 %tmp3, %A
7         %tmp6 = and i64 %tmp5, 123
8         ret i64 %tmp6
9 }
10
11 define i32 @test3(i32 %A) {
12   %B = and i32 %A, 7
13   %C = and i32 %A, 32
14   %F = add i32 %B, %C
15   ret i32 %F
16 }
17
18 define i32 @test4(i32 %A) {
19   %B = and i32 %A, 128
20   %C = lshr i32 %A, 30
21   %F = add i32 %B, %C
22   ret i32 %F
23 }
24