File: vec_shuffle-6.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 (43 lines) | stat: -rw-r--r-- 1,697 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f
; RUN: grep movapd %t | count 1
; RUN: grep movaps %t | count 1
; RUN: grep movups %t | count 2

target triple = "i686-apple-darwin"

%x = global [4 x int] [ int 1, int 2, int 3, int 4 ]

<2 x long> %test1() {
	%tmp = load int* getelementptr ([4 x int]* %x, int 0, int 0)
	%tmp3 = load int* getelementptr ([4 x int]* %x, int 0, int 1)
	%tmp5 = load int* getelementptr ([4 x int]* %x, int 0, int 2)
	%tmp7 = load int* getelementptr ([4 x int]* %x, int 0, int 3)
	%tmp = insertelement <4 x int> undef, int %tmp, uint 0
	%tmp13 = insertelement <4 x int> %tmp, int %tmp3, uint 1
	%tmp14 = insertelement <4 x int> %tmp13, int %tmp5, uint 2
	%tmp15 = insertelement <4 x int> %tmp14, int %tmp7, uint 3
	%tmp16 = cast <4 x int> %tmp15 to <2 x long>
	ret <2 x long> %tmp16
}

<4 x float> %test2(int %dummy, float %a, float %b, float %c, float %d) {
	%tmp = insertelement <4 x float> undef, float %a, uint 0
	%tmp11 = insertelement <4 x float> %tmp, float %b, uint 1
	%tmp12 = insertelement <4 x float> %tmp11, float %c, uint 2
	%tmp13 = insertelement <4 x float> %tmp12, float %d, uint 3
	ret <4 x float> %tmp13
}

<4 x float> %test3(float %a, float %b, float %c, float %d) {
	%tmp = insertelement <4 x float> undef, float %a, uint 0
	%tmp11 = insertelement <4 x float> %tmp, float %b, uint 1
	%tmp12 = insertelement <4 x float> %tmp11, float %c, uint 2
	%tmp13 = insertelement <4 x float> %tmp12, float %d, uint 3
	ret <4 x float> %tmp13
}

<2 x double> %test4(double %a, double %b) {
	%tmp = insertelement <2 x double> undef, double %a, uint 0
	%tmp7 = insertelement <2 x double> %tmp, double %b, uint 1
	ret <2 x double> %tmp7
}