File: 2009-05-09-PointerEdgeCount.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (31 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (4)
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: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s
; PR3171

; CHECK: count is 2

target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"

	%struct.Foo = type { i32 }
	%struct.NonPod = type { [2 x %struct.Foo] }

define void @_Z3foov() nounwind {
entry:
	%x = alloca %struct.NonPod, align 8		; <%struct.NonPod*> [#uses=2]
	%0 = getelementptr %struct.NonPod, %struct.NonPod* %x, i32 0, i32 0		; <[2 x %struct.Foo]*> [#uses=1]
	%1 = getelementptr [2 x %struct.Foo], [2 x %struct.Foo]* %0, i32 1, i32 0		; <%struct.Foo*> [#uses=1]
	br label %bb1.i

bb1.i:		; preds = %bb2.i, %entry
	%.0.i = phi %struct.Foo* [ %1, %entry ], [ %4, %bb2.i ]		; <%struct.Foo*> [#uses=2]
	%2 = getelementptr %struct.NonPod, %struct.NonPod* %x, i32 0, i32 0, i32 0		; <%struct.Foo*> [#uses=1]
	%3 = icmp eq %struct.Foo* %.0.i, %2		; <i1> [#uses=1]
	br i1 %3, label %_ZN6NonPodD1Ev.exit, label %bb2.i

bb2.i:		; preds = %bb1.i
	%4 = getelementptr %struct.Foo, %struct.Foo* %.0.i, i32 -1		; <%struct.Foo*> [#uses=1]
	br label %bb1.i

_ZN6NonPodD1Ev.exit:		; preds = %bb1.i
	ret void
}