File: 2007-11-03-bigendian_apint.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 (30 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download | duplicates (2)
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: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep shr

%struct.S = type { i16 }

define i1 @f(i16 signext  %b) zeroext  {
entry:
	%b_addr = alloca i16		; <i16*> [#uses=2]
	%retval = alloca i32		; <i32*> [#uses=2]
	%s = alloca %struct.S		; <%struct.S*> [#uses=2]
	%tmp = alloca i32		; <i32*> [#uses=2]
	%"alloca point" = bitcast i32 0 to i32		; <i32> [#uses=0]
	store i16 %b, i16* %b_addr
	%tmp1 = getelementptr %struct.S* %s, i32 0, i32 0		; <i16*> [#uses=1]
	%tmp2 = load i16* %b_addr, align 2		; <i16> [#uses=1]
	store i16 %tmp2, i16* %tmp1, align 2
	%tmp3 = getelementptr %struct.S* %s, i32 0, i32 0		; <i16*> [#uses=1]
	%tmp34 = bitcast i16* %tmp3 to [2 x i1]*		; <[2 x i1]*> [#uses=1]
	%tmp5 = getelementptr [2 x i1]* %tmp34, i32 0, i32 1		; <i1*> [#uses=1]
	%tmp6 = load i1* %tmp5, align 1		; <i1> [#uses=1]
	%tmp67 = zext i1 %tmp6 to i32		; <i32> [#uses=1]
	store i32 %tmp67, i32* %tmp, align 4
	%tmp8 = load i32* %tmp, align 4		; <i32> [#uses=1]
	store i32 %tmp8, i32* %retval, align 4
	br label %return

return:		; preds = %entry
	%retval9 = load i32* %retval		; <i32> [#uses=1]
	%retval910 = trunc i32 %retval9 to i1		; <i1> [#uses=1]
	ret i1 %retval910
}