From 3a558dd477cae4855a38ddaca68a284df192a39d Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 16 Oct 2016 04:54:35 +0000 Subject: [PATCH] [AVX-512] Fix the operand order for vpermi2var_qi intrinsics to match the other vpermi2var intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284329 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86IntrinsicsInfo.h | 6 +++--- test/CodeGen/X86/avx512vbmi-intrinsics.ll | 6 +++--- test/CodeGen/X86/avx512vbmivl-intrinsics.ll | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Target/X86/X86IntrinsicsInfo.h b/lib/Target/X86/X86IntrinsicsInfo.h index 513e092f008..180d06f3ea4 100644 --- a/lib/Target/X86/X86IntrinsicsInfo.h +++ b/lib/Target/X86/X86IntrinsicsInfo.h @@ -1476,11 +1476,11 @@ static const IntrinsicData IntrinsicsWithoutChain[] = { X86_INTRINSIC_DATA(avx512_mask_vpermi2var_q_512, VPERM_3OP_MASK, X86ISD::VPERMIV3, 0), X86_INTRINSIC_DATA(avx512_mask_vpermi2var_qi_128, VPERM_3OP_MASK, - X86ISD::VPERMV3, 0), + X86ISD::VPERMIV3, 0), X86_INTRINSIC_DATA(avx512_mask_vpermi2var_qi_256, VPERM_3OP_MASK, - X86ISD::VPERMV3, 0), + X86ISD::VPERMIV3, 0), X86_INTRINSIC_DATA(avx512_mask_vpermi2var_qi_512, VPERM_3OP_MASK, - X86ISD::VPERMV3, 0), + X86ISD::VPERMIV3, 0), X86_INTRINSIC_DATA(avx512_mask_vpermilvar_pd_128, INTR_TYPE_2OP_MASK, X86ISD::VPERMILPV, 0), X86_INTRINSIC_DATA(avx512_mask_vpermilvar_pd_256, INTR_TYPE_2OP_MASK, diff --git a/test/CodeGen/X86/avx512vbmi-intrinsics.ll b/test/CodeGen/X86/avx512vbmi-intrinsics.ll index 63aa001c508..c3fb77fdd91 100644 --- a/test/CodeGen/X86/avx512vbmi-intrinsics.ll +++ b/test/CodeGen/X86/avx512vbmi-intrinsics.ll @@ -47,10 +47,10 @@ define <64 x i8>@test_int_x86_avx512_mask_vpermi2var_qi_512(<64 x i8> %x0, <64 x ; CHECK: ## BB#0: ; CHECK-NEXT: kmovq %rdi, %k1 ; CHECK-NEXT: vmovdqa64 %zmm1, %zmm3 -; CHECK-NEXT: vpermt2b %zmm2, %zmm0, %zmm3 {%k1} -; CHECK-NEXT: vpermt2b %zmm2, %zmm0, %zmm1 +; CHECK-NEXT: vpermi2b %zmm2, %zmm0, %zmm3 {%k1} +; CHECK-NEXT: vpermi2b %zmm2, %zmm0, %zmm1 ; CHECK-NEXT: vpxord %zmm4, %zmm4, %zmm4 -; CHECK-NEXT: vpermt2b %zmm2, %zmm0, %zmm4 {%k1} {z} +; CHECK-NEXT: vpermi2b %zmm2, %zmm0, %zmm4 {%k1} {z} ; CHECK-NEXT: vpaddb %zmm1, %zmm3, %zmm0 ; CHECK-NEXT: vpaddb %zmm0, %zmm4, %zmm0 ; CHECK-NEXT: retq diff --git a/test/CodeGen/X86/avx512vbmivl-intrinsics.ll b/test/CodeGen/X86/avx512vbmivl-intrinsics.ll index eff8b830344..e7e403be8bd 100644 --- a/test/CodeGen/X86/avx512vbmivl-intrinsics.ll +++ b/test/CodeGen/X86/avx512vbmivl-intrinsics.ll @@ -88,10 +88,10 @@ define <16 x i8>@test_int_x86_avx512_mask_vpermi2var_qi_128(<16 x i8> %x0, <16 x ; CHECK: ## BB#0: ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf] ; CHECK-NEXT: vmovdqa64 %xmm1, %xmm3 ## encoding: [0x62,0xf1,0xfd,0x08,0x6f,0xd9] -; CHECK-NEXT: vpermt2b %xmm2, %xmm0, %xmm3 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x7d,0xda] -; CHECK-NEXT: vpermt2b %xmm2, %xmm0, %xmm1 ## encoding: [0x62,0xf2,0x7d,0x08,0x7d,0xca] +; CHECK-NEXT: vpermi2b %xmm2, %xmm0, %xmm3 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x75,0xda] +; CHECK-NEXT: vpermi2b %xmm2, %xmm0, %xmm1 ## encoding: [0x62,0xf2,0x7d,0x08,0x75,0xca] ; CHECK-NEXT: vpxord %xmm4, %xmm4, %xmm4 ## encoding: [0x62,0xf1,0x5d,0x08,0xef,0xe4] -; CHECK-NEXT: vpermt2b %xmm2, %xmm0, %xmm4 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x7d,0xe2] +; CHECK-NEXT: vpermi2b %xmm2, %xmm0, %xmm4 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x75,0xe2] ; CHECK-NEXT: vpaddb %xmm1, %xmm3, %xmm0 ## encoding: [0x62,0xf1,0x65,0x08,0xfc,0xc1] ; CHECK-NEXT: vpaddb %xmm0, %xmm4, %xmm0 ## encoding: [0x62,0xf1,0x5d,0x08,0xfc,0xc0] ; CHECK-NEXT: retq ## encoding: [0xc3] @@ -110,10 +110,10 @@ define <32 x i8>@test_int_x86_avx512_mask_vpermi2var_qi_256(<32 x i8> %x0, <32 x ; CHECK: ## BB#0: ; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf] ; CHECK-NEXT: vmovdqa64 %ymm1, %ymm3 ## encoding: [0x62,0xf1,0xfd,0x28,0x6f,0xd9] -; CHECK-NEXT: vpermt2b %ymm2, %ymm0, %ymm3 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x7d,0xda] -; CHECK-NEXT: vpermt2b %ymm2, %ymm0, %ymm1 ## encoding: [0x62,0xf2,0x7d,0x28,0x7d,0xca] +; CHECK-NEXT: vpermi2b %ymm2, %ymm0, %ymm3 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x75,0xda] +; CHECK-NEXT: vpermi2b %ymm2, %ymm0, %ymm1 ## encoding: [0x62,0xf2,0x7d,0x28,0x75,0xca] ; CHECK-NEXT: vpxord %ymm4, %ymm4, %ymm4 ## encoding: [0x62,0xf1,0x5d,0x28,0xef,0xe4] -; CHECK-NEXT: vpermt2b %ymm2, %ymm0, %ymm4 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x7d,0xe2] +; CHECK-NEXT: vpermi2b %ymm2, %ymm0, %ymm4 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x75,0xe2] ; CHECK-NEXT: vpaddb %ymm1, %ymm3, %ymm0 ## encoding: [0x62,0xf1,0x65,0x28,0xfc,0xc1] ; CHECK-NEXT: vpaddb %ymm0, %ymm4, %ymm0 ## encoding: [0x62,0xf1,0x5d,0x28,0xfc,0xc0] ; CHECK-NEXT: retq ## encoding: [0xc3]