Craig Topper | 5f9cccc | 2012-05-07 05:36:19 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=sse4a | FileCheck %s |
| 2 | |
Chris Lattner | c32cef6 | 2012-05-27 19:35:41 +0000 | [diff] [blame] | 3 | define void @test1(i8* %p, <4 x float> %a) nounwind optsize ssp { |
Benjamin Kramer | 1386e9b | 2012-05-29 19:05:25 +0000 | [diff] [blame] | 4 | ; CHECK: test1: |
Craig Topper | 5f9cccc | 2012-05-07 05:36:19 +0000 | [diff] [blame] | 5 | ; CHECK: movntss |
Chris Lattner | c32cef6 | 2012-05-27 19:35:41 +0000 | [diff] [blame] | 6 | tail call void @llvm.x86.sse4a.movnt.ss(i8* %p, <4 x float> %a) nounwind |
Craig Topper | 5f9cccc | 2012-05-07 05:36:19 +0000 | [diff] [blame] | 7 | ret void |
| 8 | } |
| 9 | |
Chris Lattner | c32cef6 | 2012-05-27 19:35:41 +0000 | [diff] [blame] | 10 | declare void @llvm.x86.sse4a.movnt.ss(i8*, <4 x float>) |
Craig Topper | 5f9cccc | 2012-05-07 05:36:19 +0000 | [diff] [blame] | 11 | |
Chris Lattner | c32cef6 | 2012-05-27 19:35:41 +0000 | [diff] [blame] | 12 | define void @test2(i8* %p, <2 x double> %a) nounwind optsize ssp { |
Benjamin Kramer | 1386e9b | 2012-05-29 19:05:25 +0000 | [diff] [blame] | 13 | ; CHECK: test2: |
Craig Topper | 5f9cccc | 2012-05-07 05:36:19 +0000 | [diff] [blame] | 14 | ; CHECK: movntsd |
Chris Lattner | c32cef6 | 2012-05-27 19:35:41 +0000 | [diff] [blame] | 15 | tail call void @llvm.x86.sse4a.movnt.sd(i8* %p, <2 x double> %a) nounwind |
Craig Topper | 5f9cccc | 2012-05-07 05:36:19 +0000 | [diff] [blame] | 16 | ret void |
| 17 | } |
| 18 | |
Chris Lattner | c32cef6 | 2012-05-27 19:35:41 +0000 | [diff] [blame] | 19 | declare void @llvm.x86.sse4a.movnt.sd(i8*, <2 x double>) |
Benjamin Kramer | 1386e9b | 2012-05-29 19:05:25 +0000 | [diff] [blame] | 20 | |
| 21 | define <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 | |
| 28 | declare <2 x i64> @llvm.x86.sse4a.extrqi(<2 x i64>, i8, i8) nounwind |
| 29 | |
| 30 | define <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 | |
| 38 | declare <2 x i64> @llvm.x86.sse4a.extrq(<2 x i64>, <16 x i8>) nounwind |
| 39 | |
| 40 | define <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 | |
| 47 | declare <2 x i64> @llvm.x86.sse4a.insertqi(<2 x i64>, <2 x i64>, i8, i8) nounwind |
| 48 | |
| 49 | define <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 | |
| 56 | declare <2 x i64> @llvm.x86.sse4a.insertq(<2 x i64>, <2 x i64>) nounwind |