aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/shl-icmp.ll
blob: a517e655cd9e507383abd9789919d842a78442e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
; RUN: opt %s -instcombine -stats -disable-output |& \
; RUN:   grep {Number of insts combined} | grep 5

define i8 @t1(i8 zeroext %x, i8 zeroext %y) zeroext nounwind {
entry:
	%tmp1 = lshr i8 %x, 7
	%cond1 = icmp ne i8 %tmp1, 0
	br i1 %cond1, label %bb1, label %bb2

bb1:
	ret i8 %tmp1

bb2:
        %tmp2 = add i8 %tmp1, %y
	ret i8 %tmp2
}

define i8 @t2(i8 zeroext %x) zeroext nounwind {
entry:
	%tmp1 = lshr i8 %x, 7
	%cond1 = icmp ne i8 %tmp1, 0
	br i1 %cond1, label %bb1, label %bb2

bb1:
	ret i8 0

bb2:
	ret i8 1
}