File: 2008-06-08-ICmpPHI.ll

package info (click to toggle)
llvm-toolchain-4.0 1%3A4.0.1-10~deb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 493,332 kB
  • sloc: cpp: 2,698,100; ansic: 552,773; asm: 128,821; python: 121,589; objc: 105,054; sh: 21,174; lisp: 6,758; ml: 5,532; perl: 5,311; pascal: 5,245; makefile: 2,083; cs: 1,868; xml: 686; php: 212; csh: 117
file content (47 lines) | stat: -rw-r--r-- 1,420 bytes parent folder | download | duplicates (20)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
; RUN: opt < %s -instcombine -S | grep "phi i32" | count 2

define void @test() nounwind  {
entry:
	br label %bb

bb:		; preds = %bb16, %entry
	%i.0 = phi i32 [ 0, %entry ], [ %indvar.next, %somebb ]		; <i32> [#uses=1]
	%x.0 = phi i32 [ 37, %entry ], [ %tmp17, %somebb ]		; <i32> [#uses=1]
	%tmp = tail call i32 (...) @bork( ) nounwind 		; <i32> [#uses=0]
	%tmp1 = tail call i32 (...) @bork( ) nounwind 		; <i32> [#uses=0]
	%tmp2 = tail call i32 (...) @bork( ) nounwind 		; <i32> [#uses=1]
	%tmp3 = icmp eq i32 %tmp2, 0		; <i1> [#uses=1]
	br i1 %tmp3, label %bb7, label %bb5

bb5:		; preds = %bb
	%tmp6 = tail call i32 (...) @bork( ) nounwind 		; <i32> [#uses=0]
	br label %bb7

bb7:		; preds = %bb5, %bb
	%tmp8 = tail call i32 (...) @bork( ) nounwind 		; <i32> [#uses=0]
	%tmp9 = tail call i32 (...) @bork( ) nounwind 		; <i32> [#uses=0]
	%tmp11 = icmp eq i32 %x.0, 37		; <i1> [#uses=1]
	br i1 %tmp11, label %bb14, label %bb16

bb14:		; preds = %bb7
	%tmp15 = tail call i32 (...) @bar( ) nounwind 		; <i32> [#uses=0]
	br label %bb16

bb16:		; preds = %bb14, %bb7
	%tmp17 = tail call i32 (...) @zap( ) nounwind 		; <i32> [#uses=1]
	%indvar.next = add i32 %i.0, 1		; <i32> [#uses=2]
	%exitcond = icmp eq i32 %indvar.next, 42		; <i1> [#uses=1]
	br i1 %exitcond, label %return, label %somebb

somebb:
	br label %bb

return:		; preds = %bb16
	ret void
}

declare i32 @bork(...)

declare i32 @bar(...)

declare i32 @zap(...)