blob: b91b8fbfb76d9191b7a7633a6ec7a4a72bff7be8 [file] [log] [blame]
Amjad Aboudf2960822016-05-12 19:58:32 +00001; RUN: llc -verify-machineinstrs -mtriple=x86_64-apple-macosx -show-mc-encoding -mattr=+avx512f < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK64
2; RUN: llc -verify-machineinstrs -mtriple=i386-apple-macosx -show-mc-encoding -mattr=+avx512f < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK32
Quentin Colombetee5f36b2016-05-10 01:09:14 +00003
Amjad Aboudf2960822016-05-12 19:58:32 +00004; Make sure we spill the high numbered ZMM registers and K registers with the right encoding.
Quentin Colombetee5f36b2016-05-10 01:09:14 +00005; CHECK-LABEL: foo
Amjad Aboudf2960822016-05-12 19:58:32 +00006; CHECK: kmovq %k7, {{.+}}
7; CHECK64: encoding: [0xc4,0xe1,0xf8,0x91,0xbc,0x24,0x68,0x08,0x00,0x00]
8; CHECK32: encoding: [0xc4,0xe1,0xf8,0x91,0xbc,0x24,0x68,0x02,0x00,0x00]
9; k6 is used as an anchor for the previous regexp.
10; CHECK-NEXT: kmovq %k6
11
12; CHECK64: movups %zmm31, {{.+}}
13; CHECK64: encoding: [0x62,0x61,0x7c,0x48,0x11,0xbc,0x24,0xe0,0x07,0x00,0x00]
Craig Topper3fef1de2016-05-10 05:27:56 +000014; zmm30 is used as an anchor for the previous regexp.
Amjad Aboudf2960822016-05-12 19:58:32 +000015; CHECK64-NEXT: movups %zmm30
16
17; CHECK32-NOT: zmm31
18; CHECK32-NOT: zmm8
19; CHECK32: movups %zmm7, {{.+}}
20; CHECK32: encoding: [0x62,0xf1,0x7c,0x48,0x11,0xbc,0x24,0xe0,0x01,0x00,0x00]
21; zmm6 is used as an anchor for the previous regexp.
22; CHECK32-NEXT: movups %zmm6
23
Quentin Colombetee5f36b2016-05-10 01:09:14 +000024; CHECK: call
25; CHECK: iret
26
27define x86_intrcc void @foo(i8* %frame) {
28 call void @bar()
29 ret void
30}
31
32declare void @bar()
33