File: 2005-07-12-TwoMallocCalls.ll

package info (click to toggle)
llvm 2.2-12
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 38,648 kB
  • ctags: 28,258
  • sloc: cpp: 215,479; sh: 12,132; ansic: 10,002; yacc: 5,525; perl: 2,352; ml: 1,580; makefile: 956; pascal: 718; lex: 602; exp: 320; ada: 193; lisp: 160; csh: 116; objc: 59; python: 59; tcl: 20
file content (19 lines) | stat: -rw-r--r-- 991 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; There should be exactly two calls here (memset and malloc), no more.
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jsr | count 2

%typedef.bc_struct = type opaque

implementation   ; Functions:

declare void %llvm.memset.i64(sbyte*, ubyte, ulong, uint)

bool %l12_l94_bc_divide_endif_2E_3_2E_ce(int* %tmp.71.reload, uint %scale2.1.3, uint %extra.0, %typedef.bc_struct* %n1, %typedef.bc_struct* %n2, int* %tmp.92.reload, uint %tmp.94.reload, int* %tmp.98.reload, uint %tmp.100.reload, sbyte** %tmp.112.out, uint* %tmp.157.out, sbyte** %tmp.158.out) {
newFuncRoot:
	%tmp.120 = add uint %extra.0, 2		; <uint> [#uses=1]
	%tmp.122 = add uint %tmp.120, %tmp.94.reload		; <uint> [#uses=1]
	%tmp.123 = add uint %tmp.122, %tmp.100.reload		; <uint> [#uses=2]
	%tmp.112 = malloc sbyte, uint %tmp.123		; <sbyte*> [#uses=3]
	%tmp.137 = cast uint %tmp.123 to ulong		; <ulong> [#uses=1]
	tail call void %llvm.memset.i64( sbyte* %tmp.112, ubyte 0, ulong %tmp.137, uint 0 )
	ret bool true
}