1; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=sse4a | FileCheck %s
2
3define void @test1(i8* %p, <4 x float> %a) nounwind optsize ssp {
4; CHECK-LABEL: test1:
5; CHECK: movntss
6  tail call void @llvm.x86.sse4a.movnt.ss(i8* %p, <4 x float> %a) nounwind
7  ret void
8}
9
10declare void @llvm.x86.sse4a.movnt.ss(i8*, <4 x float>)
11
12define void @test2(i8* %p, <2 x double> %a) nounwind optsize ssp {
13; CHECK-LABEL: test2:
14; CHECK: movntsd
15  tail call void @llvm.x86.sse4a.movnt.sd(i8* %p, <2 x double> %a) nounwind
16  ret void
17}
18
19declare void @llvm.x86.sse4a.movnt.sd(i8*, <2 x double>)
20
21define <2 x i64> @test3(<2 x i64> %x) nounwind uwtable ssp {
22; CHECK-LABEL: test3:
23; CHECK: extrq
24  %1 = tail call <2 x i64> @llvm.x86.sse4a.extrqi(<2 x i64> %x, i8 3, i8 2)
25  ret <2 x i64> %1
26}
27
28declare <2 x i64> @llvm.x86.sse4a.extrqi(<2 x i64>, i8, i8) nounwind
29
30define <2 x i64> @test4(<2 x i64> %x, <2 x i64> %y) nounwind uwtable ssp {
31; CHECK-LABEL: test4:
32; CHECK: extrq
33  %1 = bitcast <2 x i64> %y to <16 x i8>
34  %2 = tail call <2 x i64> @llvm.x86.sse4a.extrq(<2 x i64> %x, <16 x i8> %1) nounwind
35  ret <2 x i64> %2
36}
37
38declare <2 x i64> @llvm.x86.sse4a.extrq(<2 x i64>, <16 x i8>) nounwind
39
40define <2 x i64> @test5(<2 x i64> %x, <2 x i64> %y) nounwind uwtable ssp {
41; CHECK-LABEL: test5:
42; CHECK: insertq
43  %1 = tail call <2 x i64> @llvm.x86.sse4a.insertqi(<2 x i64> %x, <2 x i64> %y, i8 5, i8 6)
44  ret <2 x i64> %1
45}
46
47declare <2 x i64> @llvm.x86.sse4a.insertqi(<2 x i64>, <2 x i64>, i8, i8) nounwind
48
49define <2 x i64> @test6(<2 x i64> %x, <2 x i64> %y) nounwind uwtable ssp {
50; CHECK-LABEL: test6:
51; CHECK: insertq
52  %1 = tail call <2 x i64> @llvm.x86.sse4a.insertq(<2 x i64> %x, <2 x i64> %y) nounwind
53  ret <2 x i64> %1
54}
55
56declare <2 x i64> @llvm.x86.sse4a.insertq(<2 x i64>, <2 x i64>) nounwind
57