blob: 076e21336492906cf2075ae796996523697ecedf [file] [log] [blame]
Craig Topper5f9cccc2012-05-07 05:36:19 +00001; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=sse4a | FileCheck %s
2
Chris Lattnerc32cef62012-05-27 19:35:41 +00003define void @test1(i8* %p, <4 x float> %a) nounwind optsize ssp {
Benjamin Kramer1386e9b2012-05-29 19:05:25 +00004; CHECK: test1:
Craig Topper5f9cccc2012-05-07 05:36:19 +00005; CHECK: movntss
Chris Lattnerc32cef62012-05-27 19:35:41 +00006 tail call void @llvm.x86.sse4a.movnt.ss(i8* %p, <4 x float> %a) nounwind
Craig Topper5f9cccc2012-05-07 05:36:19 +00007 ret void
8}
9
Chris Lattnerc32cef62012-05-27 19:35:41 +000010declare void @llvm.x86.sse4a.movnt.ss(i8*, <4 x float>)
Craig Topper5f9cccc2012-05-07 05:36:19 +000011
Chris Lattnerc32cef62012-05-27 19:35:41 +000012define void @test2(i8* %p, <2 x double> %a) nounwind optsize ssp {
Benjamin Kramer1386e9b2012-05-29 19:05:25 +000013; CHECK: test2:
Craig Topper5f9cccc2012-05-07 05:36:19 +000014; CHECK: movntsd
Chris Lattnerc32cef62012-05-27 19:35:41 +000015 tail call void @llvm.x86.sse4a.movnt.sd(i8* %p, <2 x double> %a) nounwind
Craig Topper5f9cccc2012-05-07 05:36:19 +000016 ret void
17}
18
Chris Lattnerc32cef62012-05-27 19:35:41 +000019declare void @llvm.x86.sse4a.movnt.sd(i8*, <2 x double>)
Benjamin Kramer1386e9b2012-05-29 19:05:25 +000020
21define <2 x i64> @test3(<2 x i64> %x) nounwind uwtable ssp {
22; CHECK: 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: 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: 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: 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