File: bx_fold.ll

package info (click to toggle)
llvm-toolchain-3.7 1%3A3.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 345,556 kB
  • ctags: 362,199
  • sloc: cpp: 2,156,381; ansic: 458,339; objc: 91,547; python: 89,988; asm: 86,305; sh: 21,479; makefile: 6,853; perl: 5,601; ml: 5,458; pascal: 3,933; lisp: 2,429; xml: 686; cs: 239; php: 202; csh: 117
file content (31 lines) | stat: -rw-r--r-- 965 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
; RUN: llc < %s -mtriple=armv5t-apple-darwin | FileCheck %s

define void @test(i32 %Ptr, i8* %L) {
entry:
	br label %bb1

bb:		; preds = %bb1
	%gep.upgrd.1 = zext i32 %indvar to i64		; <i64> [#uses=1]
	%tmp7 = getelementptr i8, i8* %L, i64 %gep.upgrd.1		; <i8*> [#uses=1]
	store i8 0, i8* %tmp7
	%indvar.next = add i32 %indvar, 1		; <i32> [#uses=1]
	br label %bb1

bb1:		; preds = %bb, %entry
	%indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]		; <i32> [#uses=3]
	%i.0 = bitcast i32 %indvar to i32		; <i32> [#uses=2]
	%tmp = tail call i32 (...) @bar( )		; <i32> [#uses=1]
	%tmp2 = add i32 %i.0, %tmp		; <i32> [#uses=1]
	%Ptr_addr.0 = sub i32 %Ptr, %tmp2		; <i32> [#uses=0]
	%tmp12 = icmp eq i32 %i.0, %Ptr		; <i1> [#uses=1]
	%tmp12.not = xor i1 %tmp12, true		; <i1> [#uses=1]
	%bothcond = and i1 %tmp12.not, false		; <i1> [#uses=1]
	br i1 %bothcond, label %bb, label %bb18

bb18:		; preds = %bb1
; CHECK-NOT: bx
; CHECK: pop
	ret void
}

declare i32 @bar(...)