1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=skylake | FileCheck %s
4 @global = external global i32, align 4
6 define void @foo(ptr %x, <8 x i1> %y) {
9 ; CHECK-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
10 ; CHECK-NEXT: movq _global@GOTPCREL(%rip), %rax
11 ; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2
12 ; CHECK-NEXT: vpxor %xmm3, %xmm3, %xmm3
13 ; CHECK-NEXT: vpgatherdd %ymm1, (%rax,%ymm2), %ymm3
14 ; CHECK-NEXT: vpmovzxwd {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
15 ; CHECK-NEXT: vpslld $31, %ymm0, %ymm0
16 ; CHECK-NEXT: vpmaskmovd %ymm3, %ymm0, (%rdi)
18 %tmp = call <8 x i32> @llvm.masked.gather.v8i32.v8p0(<8 x ptr> <ptr @global, ptr @global, ptr @global, ptr @global, ptr @global, ptr @global, ptr @global, ptr @global>, i32 4, <8 x i1> <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>, <8 x i32> undef)
19 call void @llvm.masked.store.v8i32.p0(<8 x i32> %tmp, ptr %x, i32 4, <8 x i1> %y)
23 declare <8 x i32> @llvm.masked.gather.v8i32.v8p0(<8 x ptr>, i32, <8 x i1>, <8 x i32>)
24 declare void @llvm.masked.store.v8i32.p0(<8 x i32>, ptr, i32, <8 x i1>)