1*9880d681SAndroid Build Coastguard Worker; RUN: not llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Workerdeclare <4 x float> @llvm.x86.avx2.gather.d.ps(<4 x float>, i8*, 5*9880d681SAndroid Build Coastguard Worker <4 x i32>, <4 x float>, i8) nounwind readonly 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @test_x86_avx2_gather_d_ps(i8* %a1, 8*9880d681SAndroid Build Coastguard Worker <4 x i32> %idx, <4 x float> %mask) { 9*9880d681SAndroid Build Coastguard Worker %res = call <4 x float> @llvm.x86.avx2.gather.d.ps(<4 x float> undef, 10*9880d681SAndroid Build Coastguard Worker i8* %a1, <4 x i32> %idx, <4 x float> %mask, i8 2) ; 11*9880d681SAndroid Build Coastguard Worker ret <4 x float> %res 12*9880d681SAndroid Build Coastguard Worker} 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker; CHECK: test_x86_avx2_gather_d_ps 15*9880d681SAndroid Build Coastguard Worker; CHECK: vgatherdps 16*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: [[DST]] 17*9880d681SAndroid Build Coastguard Worker; CHECK: [[DST:%xmm[0-9]+]]{{$}} 18*9880d681SAndroid Build Coastguard Worker; CHECK: vmovaps 19*9880d681SAndroid Build Coastguard Worker; CHECK: ret 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Workerdeclare <2 x double> @llvm.x86.avx2.gather.d.pd(<2 x double>, i8*, 22*9880d681SAndroid Build Coastguard Worker <4 x i32>, <2 x double>, i8) nounwind readonly 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Workerdefine <2 x double> @test_x86_avx2_gather_d_pd(i8* %a1, 25*9880d681SAndroid Build Coastguard Worker <4 x i32> %idx, <2 x double> %mask) { 26*9880d681SAndroid Build Coastguard Worker %res = call <2 x double> @llvm.x86.avx2.gather.d.pd(<2 x double> undef, 27*9880d681SAndroid Build Coastguard Worker i8* %a1, <4 x i32> %idx, <2 x double> %mask, i8 2) ; 28*9880d681SAndroid Build Coastguard Worker ret <2 x double> %res 29*9880d681SAndroid Build Coastguard Worker} 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker; CHECK: test_x86_avx2_gather_d_pd 32*9880d681SAndroid Build Coastguard Worker; CHECK: vgatherdpd 33*9880d681SAndroid Build Coastguard Worker; CHECK: vmovapd 34*9880d681SAndroid Build Coastguard Worker; CHECK: ret 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Workerdeclare <8 x float> @llvm.x86.avx2.gather.d.ps.256(<8 x float>, i8*, 37*9880d681SAndroid Build Coastguard Worker <8 x i32>, <8 x float>, i8) nounwind readonly 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @test_x86_avx2_gather_d_ps_256(i8* %a1, 40*9880d681SAndroid Build Coastguard Worker <8 x i32> %idx, <8 x float> %mask) { 41*9880d681SAndroid Build Coastguard Worker %res = call <8 x float> @llvm.x86.avx2.gather.d.ps.256(<8 x float> undef, 42*9880d681SAndroid Build Coastguard Worker i8* %a1, <8 x i32> %idx, <8 x float> %mask, i8 4) ; 43*9880d681SAndroid Build Coastguard Worker ret <8 x float> %res 44*9880d681SAndroid Build Coastguard Worker} 45*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_x86_avx2_gather_d_ps_256 46*9880d681SAndroid Build Coastguard Worker; CHECK: vgatherdps %ymm 47*9880d681SAndroid Build Coastguard Worker; CHECK: ret 48*9880d681SAndroid Build Coastguard Worker 49*9880d681SAndroid Build Coastguard Workerdeclare <4 x double> @llvm.x86.avx2.gather.d.pd.256(<4 x double>, i8*, 50*9880d681SAndroid Build Coastguard Worker <4 x i32>, <4 x double>, i8) nounwind readonly 51*9880d681SAndroid Build Coastguard Worker 52*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @test_x86_avx2_gather_d_pd_256(i8* %a1, 53*9880d681SAndroid Build Coastguard Worker <4 x i32> %idx, <4 x double> %mask) { 54*9880d681SAndroid Build Coastguard Worker %res = call <4 x double> @llvm.x86.avx2.gather.d.pd.256(<4 x double> undef, 55*9880d681SAndroid Build Coastguard Worker i8* %a1, <4 x i32> %idx, <4 x double> %mask, i8 8) ; 56*9880d681SAndroid Build Coastguard Worker ret <4 x double> %res 57*9880d681SAndroid Build Coastguard Worker} 58*9880d681SAndroid Build Coastguard Worker 59*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_x86_avx2_gather_d_pd_256 60*9880d681SAndroid Build Coastguard Worker; CHECK: vgatherdpd %ymm 61*9880d681SAndroid Build Coastguard Worker; CHECK: ret 62