File: 2008-06-11-AvoidDupLoopHeader.ll

package info (click to toggle)
llvm-2.7 2.7-6
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 59,992 kB
  • ctags: 49,499
  • sloc: cpp: 373,792; ansic: 16,885; sh: 12,614; asm: 6,809; ada: 3,083; ml: 2,942; python: 2,671; perl: 2,404; makefile: 1,691; pascal: 1,235; exp: 399; objc: 291; lisp: 184; csh: 117; xml: 38; f90: 36
file content (27 lines) | stat: -rw-r--r-- 787 bytes parent folder | download
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
; RUN: opt < %s -tailduplicate -taildup-threshold=3 -stats -disable-output | not grep tailduplicate
; XFAIL: *

define i32 @foo(i32 %l) nounwind  {
entry:
	%cond = icmp eq i32 %l, 1		; <i1> [#uses=1]
	br i1 %cond, label %bb, label %bb9

bb:		; preds = %entry
	br label %bb9

bb5:		; preds = %bb9
	%tmp7 = call i32 (...)* @bar( i32 %x.0 ) nounwind 		; <i32> [#uses=1]
	br label %bb9

bb9:		; preds = %bb5, %bb, %entry
	%x.0 = phi i32 [ 0, %entry ], [ %tmp7, %bb5 ], [ 1525, %bb ]		; <i32> [#uses=2]
	%l_addr.0 = phi i32 [ %l, %entry ], [ %tmp11, %bb5 ], [ %l, %bb ]		; <i32> [#uses=1]
	%tmp11 = add i32 %l_addr.0, -1		; <i32> [#uses=2]
	%tmp13 = icmp eq i32 %tmp11, -1		; <i1> [#uses=1]
	br i1 %tmp13, label %bb15, label %bb5

bb15:		; preds = %bb9
	ret i32 %x.0
}

declare i32 @bar(...)