llvm.org GIT mirror llvm / 3ec862b
Fix AVX2 Gather execution domains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204713 91177308-0d34-0410-b5e6-96231b3b80d8 Cameron McInally 5 years ago
3 changed file(s) with 28 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
87908790 let mayLoad = 1, Constraints
87918791 = "@earlyclobber $dst,@earlyclobber $mask_wb, $src1 = $dst, $mask = $mask_wb"
87928792 in {
8793 defm VGATHERDPD : avx2_gather<0x92, "vgatherdpd", VR256, vx64mem, vx64mem>, VEX_W;
8794 defm VGATHERQPD : avx2_gather<0x93, "vgatherqpd", VR256, vx64mem, vy64mem>, VEX_W;
8795 defm VGATHERDPS : avx2_gather<0x92, "vgatherdps", VR256, vx32mem, vy32mem>;
8796 defm VGATHERQPS : avx2_gather<0x93, "vgatherqps", VR128, vx32mem, vy32mem>;
87978793 defm VPGATHERDQ : avx2_gather<0x90, "vpgatherdq", VR256, vx64mem, vx64mem>, VEX_W;
87988794 defm VPGATHERQQ : avx2_gather<0x91, "vpgatherqq", VR256, vx64mem, vy64mem>, VEX_W;
87998795 defm VPGATHERDD : avx2_gather<0x90, "vpgatherdd", VR256, vx32mem, vy32mem>;
88008796 defm VPGATHERQD : avx2_gather<0x91, "vpgatherqd", VR128, vx32mem, vy32mem>;
8801 }
8797
8798 let ExeDomain = SSEPackedDouble in {
8799 defm VGATHERDPD : avx2_gather<0x92, "vgatherdpd", VR256, vx64mem, vx64mem>, VEX_W;
8800 defm VGATHERQPD : avx2_gather<0x93, "vgatherqpd", VR256, vx64mem, vy64mem>, VEX_W;
8801 }
8802
8803 let ExeDomain = SSEPackedSingle in {
8804 defm VGATHERDPS : avx2_gather<0x92, "vgatherdps", VR256, vx32mem, vy32mem>;
8805 defm VGATHERQPS : avx2_gather<0x93, "vgatherqps", VR128, vx32mem, vy32mem>;
8806 }
8807 }
1414 ; CHECK: vgatherdps
1515 ; CHECK-NOT: [[DST]]
1616 ; CHECK: [[DST:%xmm[0-9]+]]{{$}}
17 ; CHECK: vmovaps
1718 ; CHECK: ret
19
20 declare <2 x double> @llvm.x86.avx2.gather.d.pd(<2 x double>, i8*,
21 <4 x i32>, <2 x double>, i8) nounwind readonly
22
23 define <2 x double> @test_x86_avx2_gather_d_pd(i8* %a1,
24 <4 x i32> %idx, <2 x double> %mask) {
25 %res = call <2 x double> @llvm.x86.avx2.gather.d.pd(<2 x double> undef,
26 i8* %a1, <4 x i32> %idx, <2 x double> %mask, i8 2) ;
27 ret <2 x double> %res
28 }
29
30 ; CHECK: test_x86_avx2_gather_d_pd
31 ; CHECK: vgatherdpd
32 ; CHECK: vmovapd
33 ; CHECK: ret
11411141 <8 x i32> %idx, <8 x float> %mask,
11421142 float* nocapture %out) {
11431143 ; CHECK: test_gather_mask
1144 ; CHECK: vmovdqa %ymm2, [[DEST:%.*]]
1144 ; CHECK: vmovaps %ymm2, [[DEST:%.*]]
11451145 ; CHECK: vgatherdps [[DEST]]
11461146 ;; gather with mask
11471147 %a_i8 = bitcast float* %a to i8*