File: 2009-01-13-nonconstant-stride-outside-loop.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (39 lines) | stat: -rw-r--r-- 1,562 bytes parent folder | download | duplicates (12)
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
; RUN: opt < %s -loop-reduce -S | grep phi | count 1
; RUN: opt < %s -loop-reduce -S | grep mul | count 1
; ModuleID = '<stdin>'
; Make sure examining a fuller expression outside the loop doesn't cause us to create a second
; IV of stride %3.
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin9.5"
	%struct.anon = type { ptr, ptr }
	%struct.obj = type { i16, i16, { %struct.anon } }
@heap_size = external global i32		; <ptr> [#uses=1]
@"\01LC85" = external constant [39 x i8]		; <ptr> [#uses=1]

declare i32 @sprintf(ptr, ptr, ...) nounwind

define ptr @gc_status(ptr %args) nounwind {
entry:
	br label %bb1.i

bb.i2:		; preds = %bb2.i3
	%indvar.next24 = add i32 %m.0.i, 1		; <i32> [#uses=1]
	br label %bb1.i

bb1.i:		; preds = %bb.i2, %entry
	%m.0.i = phi i32 [ 0, %entry ], [ %indvar.next24, %bb.i2 ]		; <i32> [#uses=4]
	%0 = icmp slt i32 %m.0.i, 0		; <i1> [#uses=1]
	br i1 %0, label %bb2.i3, label %nactive_heaps.exit

bb2.i3:		; preds = %bb1.i
	%1 = load ptr, ptr null, align 4		; <ptr> [#uses=1]
	%2 = icmp eq ptr %1, null		; <i1> [#uses=1]
	br i1 %2, label %nactive_heaps.exit, label %bb.i2

nactive_heaps.exit:		; preds = %bb2.i3, %bb1.i
	%3 = load i32, ptr @heap_size, align 4		; <i32> [#uses=1]
	%4 = mul i32 %3, %m.0.i		; <i32> [#uses=1]
	%5 = sub i32 %4, 0		; <i32> [#uses=1]
	%6 = tail call i32 (ptr, ptr, ...) @sprintf(ptr null, ptr @"\01LC85", i32 %m.0.i, i32 0, i32 %5, i32 0) nounwind		; <i32> [#uses=0]
	ret ptr null
}