File: loop-strength-reduce2.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 (30 lines) | stat: -rw-r--r-- 1,231 bytes parent folder | download | duplicates (19)
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
; RUN: llc < %s -mtriple=i686-apple-darwin -relocation-model=pic | FileCheck %s
;
; Make sure the PIC label flags2-"L1$pb" is not moved up to the preheader.
; CHECK: mov{{.}} {{.*}}$pb

@flags2 = internal global [8193 x i8] zeroinitializer, align 32		; <[8193 x i8]*> [#uses=1]

define void @test(i32 %k, i32 %i) nounwind {
entry:
	%k_addr.012 = shl i32 %i, 1		; <i32> [#uses=1]
	%tmp14 = icmp sgt i32 %k_addr.012, 8192		; <i1> [#uses=1]
	br i1 %tmp14, label %return, label %bb

bb:		; preds = %bb, %entry
	%indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]		; <i32> [#uses=2]
	%tmp. = shl i32 %i, 1		; <i32> [#uses=1]
	%tmp.15 = mul i32 %indvar, %i		; <i32> [#uses=1]
	%tmp.16 = add i32 %tmp.15, %tmp.		; <i32> [#uses=2]
	%k_addr.0.0 = bitcast i32 %tmp.16 to i32		; <i32> [#uses=1]
	%gep.upgrd.1 = zext i32 %tmp.16 to i64		; <i64> [#uses=1]
	%tmp = getelementptr [8193 x i8], [8193 x i8]* @flags2, i32 0, i64 %gep.upgrd.1		; <i8*> [#uses=1]
	store i8 0, i8* %tmp
	%k_addr.0 = add i32 %k_addr.0.0, %i		; <i32> [#uses=1]
	%tmp.upgrd.2 = icmp sgt i32 %k_addr.0, 8192		; <i1> [#uses=1]
	%indvar.next = add i32 %indvar, 1		; <i32> [#uses=1]
	br i1 %tmp.upgrd.2, label %return, label %bb

return:		; preds = %bb, %entry
	ret void
}