File: 2007-04-25-MMX-PADDQ.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 (25 lines) | stat: -rw-r--r-- 1,244 bytes parent folder | download
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
; RUN: llvm-as < %s | llc -o - -march=x86 -mattr=+mmx | grep paddq | count 2
; RUN: llvm-as < %s | llc -o - -march=x86 -mattr=+mmx | grep movq | count 3

define <1 x i64> @unsigned_add3(<1 x i64>* %a, <1 x i64>* %b, i32 %count) {
entry:
	%tmp2942 = icmp eq i32 %count, 0		; <i1> [#uses=1]
	br i1 %tmp2942, label %bb31, label %bb26

bb26:		; preds = %bb26, %entry
	%i.037.0 = phi i32 [ 0, %entry ], [ %tmp25, %bb26 ]		; <i32> [#uses=3]
	%sum.035.0 = phi <1 x i64> [ zeroinitializer, %entry ], [ %tmp22, %bb26 ]		; <<1 x i64>> [#uses=1]
	%tmp13 = getelementptr <1 x i64>* %b, i32 %i.037.0		; <<1 x i64>*> [#uses=1]
	%tmp14 = load <1 x i64>* %tmp13		; <<1 x i64>> [#uses=1]
	%tmp18 = getelementptr <1 x i64>* %a, i32 %i.037.0		; <<1 x i64>*> [#uses=1]
	%tmp19 = load <1 x i64>* %tmp18		; <<1 x i64>> [#uses=1]
	%tmp21 = add <1 x i64> %tmp19, %tmp14		; <<1 x i64>> [#uses=1]
	%tmp22 = add <1 x i64> %tmp21, %sum.035.0		; <<1 x i64>> [#uses=2]
	%tmp25 = add i32 %i.037.0, 1		; <i32> [#uses=2]
	%tmp29 = icmp ult i32 %tmp25, %count		; <i1> [#uses=1]
	br i1 %tmp29, label %bb26, label %bb31

bb31:		; preds = %bb26, %entry
	%sum.035.1 = phi <1 x i64> [ zeroinitializer, %entry ], [ %tmp22, %bb26 ]		; <<1 x i64>> [#uses=1]
	ret <1 x i64> %sum.035.1
}