1*9880d681SAndroid Build Coastguard Worker; RUN: llc -verify-machineinstrs -mtriple=x86_64-apple-macosx -show-mc-encoding -mattr=+avx512f < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK64 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -verify-machineinstrs -mtriple=i386-apple-macosx -show-mc-encoding -mattr=+avx512f < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK32 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; Make sure we spill the high numbered ZMM registers and K registers with the right encoding. 5*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: foo 6*9880d681SAndroid Build Coastguard Worker; CHECK: kmovq %k7, {{.+}} 7*9880d681SAndroid Build Coastguard Worker; CHECK64: encoding: [0xc4,0xe1,0xf8,0x91,0xbc,0x24,0x68,0x08,0x00,0x00] 8*9880d681SAndroid Build Coastguard Worker; CHECK32: encoding: [0xc4,0xe1,0xf8,0x91,0xbc,0x24,0x68,0x02,0x00,0x00] 9*9880d681SAndroid Build Coastguard Worker; k6 is used as an anchor for the previous regexp. 10*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: kmovq %k6 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker; CHECK64: movups %zmm31, {{.+}} 13*9880d681SAndroid Build Coastguard Worker; CHECK64: encoding: [0x62,0x61,0x7c,0x48,0x11,0xbc,0x24,0xe0,0x07,0x00,0x00] 14*9880d681SAndroid Build Coastguard Worker; zmm30 is used as an anchor for the previous regexp. 15*9880d681SAndroid Build Coastguard Worker; CHECK64-NEXT: movups %zmm30 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker; CHECK32-NOT: zmm31 18*9880d681SAndroid Build Coastguard Worker; CHECK32-NOT: zmm8 19*9880d681SAndroid Build Coastguard Worker; CHECK32: movups %zmm7, {{.+}} 20*9880d681SAndroid Build Coastguard Worker; CHECK32: encoding: [0x62,0xf1,0x7c,0x48,0x11,0xbc,0x24,0xe0,0x01,0x00,0x00] 21*9880d681SAndroid Build Coastguard Worker; zmm6 is used as an anchor for the previous regexp. 22*9880d681SAndroid Build Coastguard Worker; CHECK32-NEXT: movups %zmm6 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Worker; CHECK: call 25*9880d681SAndroid Build Coastguard Worker; CHECK: iret 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Workerdefine x86_intrcc void @foo(i8* %frame) { 28*9880d681SAndroid Build Coastguard Worker call void @bar() 29*9880d681SAndroid Build Coastguard Worker ret void 30*9880d681SAndroid Build Coastguard Worker} 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Workerdeclare void @bar() 33*9880d681SAndroid Build Coastguard Worker 34