1 ; Tests to make sure intrinsics are automatically upgraded.
2 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s
5 declare <4 x float> @llvm.x86.sse.loadu.ps(i8*) nounwind readnone
6 declare <16 x i8> @llvm.x86.sse2.loadu.dq(i8*) nounwind readnone
7 declare <2 x double> @llvm.x86.sse2.loadu.pd(double*) nounwind readnone
8 define void @test_loadu(i8* %a, double* %b) {
9 %v0 = call <4 x float> @llvm.x86.sse.loadu.ps(i8* %a)
10 %v1 = call <16 x i8> @llvm.x86.sse2.loadu.dq(i8* %a)
11 %v2 = call <2 x double> @llvm.x86.sse2.loadu.pd(double* %b)
13 ; CHECK: load i128* {{.*}}, align 1
14 ; CHECK: load i128* {{.*}}, align 1
15 ; CHECK: load i128* {{.*}}, align 1
19 declare void @llvm.x86.sse.movnt.ps(i8*, <4 x float>) nounwind readnone
20 declare void @llvm.x86.sse2.movnt.dq(i8*, <2 x double>) nounwind readnone
21 declare void @llvm.x86.sse2.movnt.pd(i8*, <2 x double>) nounwind readnone
22 declare void @llvm.x86.sse2.movnt.i(i8*, i32) nounwind readnone
24 define void @f(<4 x float> %A, i8* %B, <2 x double> %C, i32 %D) {
25 ; CHECK: store{{.*}}nontemporal
26 call void @llvm.x86.sse.movnt.ps(i8* %B, <4 x float> %A)
27 ; CHECK: store{{.*}}nontemporal
28 call void @llvm.x86.sse2.movnt.dq(i8* %B, <2 x double> %C)
29 ; CHECK: store{{.*}}nontemporal
30 call void @llvm.x86.sse2.movnt.pd(i8* %B, <2 x double> %C)
31 ; CHECK: store{{.*}}nontemporal
32 call void @llvm.x86.sse2.movnt.i(i8* %B, i32 %D)
36 declare void @llvm.prefetch(i8*, i32, i32) nounwind
38 define void @p(i8* %ptr) {
39 ; CHECK: llvm.prefetch(i8* %ptr, i32 0, i32 1, i32 1)
40 tail call void @llvm.prefetch(i8* %ptr, i32 0, i32 1)