[llvm] r269221 - [X86][AVX512] Fixed VPERMILPD/VPERMILPS shuffle comments.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 11:53:44 PDT 2016
Author: rksimon
Date: Wed May 11 13:53:44 2016
New Revision: 269221
URL: http://llvm.org/viewvc/llvm-project?rev=269221&view=rev
Log:
[X86][AVX512] Fixed VPERMILPD/VPERMILPS shuffle comments.
Fixed incorrect operands indices used to access src registers
Modified:
llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp
llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll
llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll
Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp?rev=269221&r1=269220&r2=269221&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp (original)
+++ llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp Wed May 11 13:53:44 2016
@@ -588,7 +588,7 @@ bool llvm::EmitAnyX86InstComments(const
break;
CASE_VPERM(PERMILPS, r)
- Src1Name = getRegName(MI->getOperand(1).getReg());
+ Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH.
CASE_VPERM(PERMILPS, m)
if (MI->getOperand(NumOperands - 1).isImm())
@@ -599,7 +599,7 @@ bool llvm::EmitAnyX86InstComments(const
break;
CASE_VPERM(PERMILPD, r)
- Src1Name = getRegName(MI->getOperand(1).getReg());
+ Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH.
CASE_VPERM(PERMILPD, m)
if (MI->getOperand(NumOperands - 1).isImm())
Modified: llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll?rev=269221&r1=269220&r2=269221&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll Wed May 11 13:53:44 2016
@@ -5988,8 +5988,8 @@ define <8 x double>@test_int_x86_avx512_
; CHECK-LABEL: test_int_x86_avx512_mask_vpermil_pd_512:
; CHECK: ## BB#0:
; CHECK-NEXT: kmovw %edi, %k1
-; CHECK-NEXT: vpermilpd {{.*#+}} zmm1 = zmm1[0,1,3,2,5,4,6,6]
-; CHECK-NEXT: vpermilpd {{.*#+}} zmm2 = k1[0,1,3,2,5,4,6,6]
+; CHECK-NEXT: vpermilpd {{.*#+}} zmm1 = zmm0[0,1,3,2,5,4,6,6]
+; CHECK-NEXT: vpermilpd {{.*#+}} zmm2 = zmm0[0,1,3,2,5,4,6,6]
; CHECK-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[0,1,3,2,5,4,6,6]
; CHECK-NEXT: vaddpd %zmm2, %zmm1, %zmm1
; CHECK-NEXT: vaddpd %zmm0, %zmm1, %zmm0
@@ -6008,8 +6008,8 @@ define <16 x float>@test_int_x86_avx512_
; CHECK-LABEL: test_int_x86_avx512_mask_vpermil_ps_512:
; CHECK: ## BB#0:
; CHECK-NEXT: kmovw %edi, %k1
-; CHECK-NEXT: vpermilps {{.*#+}} zmm1 = zmm1[2,1,1,0,6,5,5,4,10,9,9,8,14,13,13,12]
-; CHECK-NEXT: vpermilps {{.*#+}} zmm2 = k1[2,1,1,0,6,5,5,4,10,9,9,8,14,13,13,12]
+; CHECK-NEXT: vpermilps {{.*#+}} zmm1 = zmm0[2,1,1,0,6,5,5,4,10,9,9,8,14,13,13,12]
+; CHECK-NEXT: vpermilps {{.*#+}} zmm2 = zmm0[2,1,1,0,6,5,5,4,10,9,9,8,14,13,13,12]
; CHECK-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[2,1,1,0,6,5,5,4,10,9,9,8,14,13,13,12]
; CHECK-NEXT: vaddps %zmm2, %zmm1, %zmm1
; CHECK-NEXT: vaddps %zmm0, %zmm1, %zmm0
Modified: llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll?rev=269221&r1=269220&r2=269221&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll Wed May 11 13:53:44 2016
@@ -4834,9 +4834,9 @@ define <4 x double>@test_int_x86_avx512_
; CHECK: ## BB#0:
; CHECK-NEXT: kmovw %edi, %k1
; CHECK-NEXT: vpermilpd $22, %ymm0, %ymm1 {%k1}
-; CHECK-NEXT: ## ymm1 = ymm1[0,1,3,2]
+; CHECK-NEXT: ## ymm1 = ymm0[0,1,3,2]
; CHECK-NEXT: vpermilpd $22, %ymm0, %ymm2 {%k1} {z}
-; CHECK-NEXT: ## ymm2 = k1[0,1,3,2]
+; CHECK-NEXT: ## ymm2 = ymm0[0,1,3,2]
; CHECK-NEXT: vpermilpd $22, %ymm0, %ymm0
; CHECK-NEXT: ## ymm0 = ymm0[0,1,3,2]
; CHECK-NEXT: vaddpd %ymm2, %ymm1, %ymm1
@@ -4857,9 +4857,9 @@ define <2 x double>@test_int_x86_avx512_
; CHECK: ## BB#0:
; CHECK-NEXT: kmovw %edi, %k1
; CHECK-NEXT: vpermilpd $1, %xmm0, %xmm1 {%k1}
-; CHECK-NEXT: ## xmm1 = xmm1[1,0]
+; CHECK-NEXT: ## xmm1 = xmm0[1,0]
; CHECK-NEXT: vpermilpd $1, %xmm0, %xmm2 {%k1} {z}
-; CHECK-NEXT: ## xmm2 = k1[1,0]
+; CHECK-NEXT: ## xmm2 = xmm0[1,0]
; CHECK-NEXT: vpermilpd $1, %xmm0, %xmm0
; CHECK-NEXT: ## xmm0 = xmm0[1,0]
; CHECK-NEXT: vaddpd %xmm2, %xmm1, %xmm1
@@ -4880,9 +4880,9 @@ define <8 x float>@test_int_x86_avx512_m
; CHECK: ## BB#0:
; CHECK-NEXT: kmovw %edi, %k1
; CHECK-NEXT: vpermilps $22, %ymm0, %ymm1 {%k1}
-; CHECK-NEXT: ## ymm1 = ymm1[2,1,1,0,6,5,5,4]
+; CHECK-NEXT: ## ymm1 = ymm0[2,1,1,0,6,5,5,4]
; CHECK-NEXT: vpermilps $22, %ymm0, %ymm2 {%k1} {z}
-; CHECK-NEXT: ## ymm2 = k1[2,1,1,0,6,5,5,4]
+; CHECK-NEXT: ## ymm2 = ymm0[2,1,1,0,6,5,5,4]
; CHECK-NEXT: vpermilps $22, %ymm0, %ymm0
; CHECK-NEXT: ## ymm0 = ymm0[2,1,1,0,6,5,5,4]
; CHECK-NEXT: vaddps %ymm2, %ymm1, %ymm1
@@ -4903,9 +4903,9 @@ define <4 x float>@test_int_x86_avx512_m
; CHECK: ## BB#0:
; CHECK-NEXT: kmovw %edi, %k1
; CHECK-NEXT: vpermilps $22, %xmm0, %xmm1 {%k1}
-; CHECK-NEXT: ## xmm1 = xmm1[2,1,1,0]
+; CHECK-NEXT: ## xmm1 = xmm0[2,1,1,0]
; CHECK-NEXT: vpermilps $22, %xmm0, %xmm2 {%k1} {z}
-; CHECK-NEXT: ## xmm2 = k1[2,1,1,0]
+; CHECK-NEXT: ## xmm2 = xmm0[2,1,1,0]
; CHECK-NEXT: vpermilps $22, %xmm0, %xmm0
; CHECK-NEXT: ## xmm0 = xmm0[2,1,1,0]
; CHECK-NEXT: vaddps %xmm2, %xmm1, %xmm1
More information about the llvm-commits
mailing list