Nadav Rotem | 7431211 | 2013-01-18 23:10:30 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -o - < %s | FileCheck %s |
| 2 | |
Stephen Lin | 6f36b45 | 2013-07-18 22:47:09 +0000 | [diff] [blame] | 3 | ;CHECK-LABEL: wideloads: |
Nadav Rotem | 7431211 | 2013-01-18 23:10:30 +0000 | [diff] [blame] | 4 | ;CHECK: vmovaps |
| 5 | ;CHECK: vinsertf128 |
Nadav Rotem | 7b3120b | 2013-01-19 08:38:41 +0000 | [diff] [blame] | 6 | ;CHECK: vmovaps |
Nadav Rotem | 7431211 | 2013-01-18 23:10:30 +0000 | [diff] [blame] | 7 | ;CHECK-NOT: vinsertf128 |
| 8 | ;CHECK: ret |
| 9 | |
| 10 | define void @wideloads(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp { |
| 11 | %v0 = load <8 x float>* %a, align 16 ; <---- unaligned! |
| 12 | %v1 = load <8 x float>* %b, align 32 ; <---- aligned! |
| 13 | %m0 = fcmp olt <8 x float> %v1, %v0 |
Nadav Rotem | 7b3120b | 2013-01-19 08:38:41 +0000 | [diff] [blame] | 14 | %v2 = load <8 x float>* %c, align 32 ; <---- aligned! |
Nadav Rotem | 7431211 | 2013-01-18 23:10:30 +0000 | [diff] [blame] | 15 | %m1 = fcmp olt <8 x float> %v2, %v0 |
| 16 | %mand = and <8 x i1> %m1, %m0 |
| 17 | %r = zext <8 x i1> %mand to <8 x i32> |
Nadav Rotem | 7b3120b | 2013-01-19 08:38:41 +0000 | [diff] [blame] | 18 | store <8 x i32> %r, <8 x i32>* undef, align 32 |
| 19 | ret void |
| 20 | } |
| 21 | |
| 22 | ; CHECK: widestores |
| 23 | ; loads: |
| 24 | ; CHECK: vmovaps |
| 25 | ; CHECK: vmovaps |
| 26 | ; stores: |
| 27 | ; CHECK: vmovaps |
| 28 | ; CHECK: vextractf128 |
| 29 | ; CHECK: vmovaps |
| 30 | ;CHECK: ret |
| 31 | |
| 32 | define void @widestores(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp { |
| 33 | %v0 = load <8 x float>* %a, align 32 |
| 34 | %v1 = load <8 x float>* %b, align 32 |
| 35 | store <8 x float> %v0, <8 x float>* %b, align 32 ; <--- aligned |
| 36 | store <8 x float> %v1, <8 x float>* %a, align 16 ; <--- unaligned |
Nadav Rotem | 7431211 | 2013-01-18 23:10:30 +0000 | [diff] [blame] | 37 | ret void |
| 38 | } |
| 39 | |