[PATCH] D14062: AVX-512: Bug fix, use correct extract vector length.

Igor Breger via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 05:06:12 PDT 2015


igorb created this revision.
igorb added a reviewer: delena.
igorb added a subscriber: llvm-commits.
igorb set the repository for this revision to rL LLVM.

Bug  https://llvm.org/bugs/show_bug.cgi?id=25318

AVX-512:  Use correct extract vector length.

Repository:
  rL LLVM

http://reviews.llvm.org/D14062

Files:
  lib/Target/X86/X86InstrAVX512.td
  test/CodeGen/X86/vector-shuffle-512-v16.ll

Index: test/CodeGen/X86/vector-shuffle-512-v16.ll
===================================================================
--- test/CodeGen/X86/vector-shuffle-512-v16.ll
+++ test/CodeGen/X86/vector-shuffle-512-v16.ll
@@ -120,3 +120,14 @@
   ret <16 x i32> %c
 }
 
+define <8 x float> @shuffle_v16f32_extract_256(float* %RET, float* %a) {
+; ALL-LABEL: shuffle_v16f32_extract_256:
+; ALL:       # BB#0:
+; ALL-NEXT:    vmovups (%rsi), %zmm0
+; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
+; ALL-NEXT:    retq
+  %ptr_a = bitcast float* %a to <16 x float>*
+  %v_a = load <16 x float>, <16 x float>* %ptr_a, align 4
+  %v2 = shufflevector <16 x float> %v_a, <16 x float> undef, <8 x i32>  <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
+  ret <8 x float> %v2
+}
Index: lib/Target/X86/X86InstrAVX512.td
===================================================================
--- lib/Target/X86/X86InstrAVX512.td
+++ lib/Target/X86/X86InstrAVX512.td
@@ -739,7 +739,7 @@
           vextract128_extract, EXTRACT_get_vextract128_imm, [HasAVX512, NoDQI]>;
 
 defm : vextract_for_size_lowering<"VEXTRACTF64x4Z", v16f32_info, v8f32x_info,
-          vextract128_extract, EXTRACT_get_vextract128_imm, [HasAVX512, NoDQI]>;
+          vextract256_extract, EXTRACT_get_vextract256_imm, [HasAVX512, NoDQI]>;
 defm : vextract_for_size_lowering<"VEXTRACTI64x4Z", v16i32_info, v8i32x_info,
           vextract256_extract, EXTRACT_get_vextract256_imm, [HasAVX512, NoDQI]>;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14062.38392.patch
Type: text/x-patch
Size: 1463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151026/0dfd3770/attachment.bin>


More information about the llvm-commits mailing list